From patchwork Wed Jun 1 10:39:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12866656 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5234C433F5 for ; Wed, 1 Jun 2022 10:39:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 484916B00B8; Wed, 1 Jun 2022 06:39:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 457C76B00BA; Wed, 1 Jun 2022 06:39:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 31DFD6B00BB; Wed, 1 Jun 2022 06:39:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 1ED0C6B00B8 for ; Wed, 1 Jun 2022 06:39:35 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id E3A3F3476E for ; Wed, 1 Jun 2022 10:39:34 +0000 (UTC) X-FDA: 79529320668.26.5660817 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by imf08.hostedemail.com (Postfix) with ESMTP id F1922160046 for ; Wed, 1 Jun 2022 10:39:08 +0000 (UTC) Received: by mail-pf1-f181.google.com with SMTP id z17so1598470pff.7 for ; Wed, 01 Jun 2022 03:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pVK/jozl1uAfEzK6vleMbKcySwChksKYsG5Iw08IS/c=; b=C78pEyOpmxImWyrV8RjqLJf8nPmlGYFD0fqdmXSu3XWNvntM2agBp44iozoainWKJ3 Axaui0YVALbQSEnR8rjEVrFcjCX26PCWreT1waD7QsntpteG59FKz9Mnrrnuu3nB9eve oCddJpnbDynKK9HCCW91lnavxEvDNpWEdylgo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pVK/jozl1uAfEzK6vleMbKcySwChksKYsG5Iw08IS/c=; b=iZWd3Jgo7WTW7QpPT77EDDacDBnAsfsyPpQm3ko8nsWm0glfpUUhX4xyStKE/9BqPX MTIPLdXxCWKccgAYppSDJmm9dsHR00BKqG8xF3tnl13JZISPg5e1hjnK0fT45ZsguBvK cHTOTM6ttjUlsDx3Ihx2dbqz+T/MvqnaTECm71q4Ap3AyXE24bOM+hYTFa7EWBCIOomh FKvVwzgi1U2aXLJ1600ykbL30OCC+v4TUpiS1sNOXejMsbaR1znFf6tc9GnJj9RyHb2z 4icth0hQxAea/pAAzDjOtTjrwmomBECRAGW9N2Emdyg+e2wrLmXNDHsP3EEeCNhrDSNA VgqQ== X-Gm-Message-State: AOAM531lsFEjPMKfWFOu+XX1w28hvgce+dnO7MiqX79PUQMOVkildA3D bFv6TUIK0xcnPHOSR9MtMg7wIg== X-Google-Smtp-Source: ABdhPJxPBOFPDzYcJlTD535ykPd7L0x0pOe9kzUL+ouANmI7/8e7l2tiHiElnHP5BQ4D4XG6GTHbZA== X-Received: by 2002:a65:6b94:0:b0:3fb:16f4:3620 with SMTP id d20-20020a656b94000000b003fb16f43620mr26218963pgw.464.1654079973429; Wed, 01 Jun 2022 03:39:33 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:dc30:e75c:ae95:f2d6]) by smtp.gmail.com with ESMTPSA id i9-20020a17090332c900b00163bfaf0b17sm1183867plr.233.2022.06.01.03.39.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 03:39:32 -0700 (PDT) From: Hsin-Yi Wang To: Phillip Lougher , Matthew Wilcox , Xiongwei Song Cc: Zheng Liang , Zhang Yi , Hou Tao , Miao Xie , Andrew Morton , "linux-mm @ kvack . org" , "squashfs-devel @ lists . sourceforge . net" , linux-kernel@vger.kernel.org Subject: [PATCH v4 2/3] squashfs: always build "file direct" version of page actor Date: Wed, 1 Jun 2022 18:39:21 +0800 Message-Id: <20220601103922.1338320-3-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220601103922.1338320-1-hsinyi@chromium.org> References: <20220601103922.1338320-1-hsinyi@chromium.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: F1922160046 X-Stat-Signature: 7um1ughyb77ipifauh371c5r716dwg64 X-Rspam-User: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=C78pEyOp; spf=pass (imf08.hostedemail.com: domain of hsinyi@chromium.org designates 209.85.210.181 as permitted sender) smtp.mailfrom=hsinyi@chromium.org; dmarc=pass (policy=none) header.from=chromium.org X-Rspamd-Server: rspam08 X-HE-Tag: 1654079948-405435 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Phillip Lougher Squashfs_readahead uses the "file direct" version of the page actor, and so build it unconditionally. Reported-by: kernel test robot Signed-off-by: Phillip Lougher Signed-off-by: Hsin-Yi Wang --- fs/squashfs/Makefile | 4 ++-- fs/squashfs/page_actor.h | 41 ---------------------------------------- 2 files changed, 2 insertions(+), 43 deletions(-) diff --git a/fs/squashfs/Makefile b/fs/squashfs/Makefile index 7bd9b8b856d0..477c89a519ee 100644 --- a/fs/squashfs/Makefile +++ b/fs/squashfs/Makefile @@ -5,9 +5,9 @@ obj-$(CONFIG_SQUASHFS) += squashfs.o squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o -squashfs-y += namei.o super.o symlink.o decompressor.o +squashfs-y += namei.o super.o symlink.o decompressor.o page_actor.o squashfs-$(CONFIG_SQUASHFS_FILE_CACHE) += file_cache.o -squashfs-$(CONFIG_SQUASHFS_FILE_DIRECT) += file_direct.o page_actor.o +squashfs-$(CONFIG_SQUASHFS_FILE_DIRECT) += file_direct.o squashfs-$(CONFIG_SQUASHFS_DECOMP_SINGLE) += decompressor_single.o squashfs-$(CONFIG_SQUASHFS_DECOMP_MULTI) += decompressor_multi.o squashfs-$(CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU) += decompressor_multi_percpu.o diff --git a/fs/squashfs/page_actor.h b/fs/squashfs/page_actor.h index 2e3073ace009..26e07373af8a 100644 --- a/fs/squashfs/page_actor.h +++ b/fs/squashfs/page_actor.h @@ -6,46 +6,6 @@ * Phillip Lougher */ -#ifndef CONFIG_SQUASHFS_FILE_DIRECT -struct squashfs_page_actor { - void **page; - int pages; - int length; - int next_page; -}; - -static inline struct squashfs_page_actor *squashfs_page_actor_init(void **page, - int pages, int length) -{ - struct squashfs_page_actor *actor = kmalloc(sizeof(*actor), GFP_KERNEL); - - if (actor == NULL) - return NULL; - - actor->length = length ? : pages * PAGE_SIZE; - actor->page = page; - actor->pages = pages; - actor->next_page = 0; - return actor; -} - -static inline void *squashfs_first_page(struct squashfs_page_actor *actor) -{ - actor->next_page = 1; - return actor->page[0]; -} - -static inline void *squashfs_next_page(struct squashfs_page_actor *actor) -{ - return actor->next_page == actor->pages ? NULL : - actor->page[actor->next_page++]; -} - -static inline void squashfs_finish_page(struct squashfs_page_actor *actor) -{ - /* empty */ -} -#else struct squashfs_page_actor { union { void **buffer; @@ -76,4 +36,3 @@ static inline void squashfs_finish_page(struct squashfs_page_actor *actor) actor->squashfs_finish_page(actor); } #endif -#endif