From patchwork Mon Jun 6 15:03:04 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: 12870503 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 5ED4DC43334 for ; Mon, 6 Jun 2022 15:03:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 002DC6B0073; Mon, 6 Jun 2022 11:03:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EF4028D0003; Mon, 6 Jun 2022 11:03:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DBCFE8D0002; Mon, 6 Jun 2022 11:03:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id CB74D6B0073 for ; Mon, 6 Jun 2022 11:03:18 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 99FEA2096C for ; Mon, 6 Jun 2022 15:03:18 +0000 (UTC) X-FDA: 79548129276.14.13C6514 Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by imf31.hostedemail.com (Postfix) with ESMTP id 8B4A520085 for ; Mon, 6 Jun 2022 15:02:32 +0000 (UTC) Received: by mail-pf1-f175.google.com with SMTP id u2so12931139pfc.2 for ; Mon, 06 Jun 2022 08:03:17 -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=Oxd/anO5WtkVJUJUgToYwFGiGcM0uJJsObud5uRjsZD734hCJCXzwYzEeQISgp71My 3mGUbBcR7ZEpbzr4bYMhTomrpQoIarU3oHkHDIAQXTYdIneSuMqhogsSNW8tD2KxwBd8 V472zawpFjB3cIohTPsvNj9VlZyY94WZGKSYU= 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=g9y9D4ZZmqwAAn1w9x5FUJ8zOgvk/n0UoiUtLWysCEzxrL5xPfTchIjsy7kEUMFK0c 5Lb9+umD/aGp/wX03hLvRkVKcfFxJcN21QITGWR/S96i4T3FZBZh9W0HK6zwoJgWKj8+ 1fsJQO29G6t7w5DYU5NSWGFINDZaCyF7HxIrKqwhL/xm5yOQ8H4HSpCG+2oNMqoRaICK wNfZtt3VKfmIn8F5T+DUqCIYHJl1oZFB0RXhY4Og8o6maiiVCJ6j6g0a6PaB2HOVXf5K yf/mC+6uu2X16++AIzMsb3wv3DSQmSgM8+eXYNlh9HOUJFMrRAvxj+DdrENRxVqq/uC8 Y2fg== X-Gm-Message-State: AOAM532IhQ0GhEu5094QEqBQfAoTXOiRh5DfE/yQQ7OzyYXcLSfbxTSE DpJB5v909OJMRPfNhkdY4Egd4g== X-Google-Smtp-Source: ABdhPJzSAIABYaN16VMQB1hldKycOjrImKiWwTvNsL3jcjjJ0ONvT8gnKk77CzvvBg2ZGDkPEC9TGw== X-Received: by 2002:a63:fa15:0:b0:3fd:9170:9496 with SMTP id y21-20020a63fa15000000b003fd91709496mr7945484pgh.162.1654527796764; Mon, 06 Jun 2022 08:03:16 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:a0a:5e4:e24:c8c4]) by smtp.gmail.com with ESMTPSA id k13-20020aa7998d000000b0050dc76281ecsm7468864pfh.198.2022.06.06.08.03.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 08:03:16 -0700 (PDT) From: Hsin-Yi Wang To: Phillip Lougher , Matthew Wilcox , Xiongwei Song , Marek Szyprowski , Andrew Morton Cc: Zheng Liang , Zhang Yi , Hou Tao , Miao Xie , "linux-mm @ kvack . org" , "squashfs-devel @ lists . sourceforge . net" , linux-kernel@vger.kernel.org Subject: [PATCH v5 2/3] squashfs: always build "file direct" version of page actor Date: Mon, 6 Jun 2022 23:03:04 +0800 Message-Id: <20220606150305.1883410-3-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220606150305.1883410-1-hsinyi@chromium.org> References: <20220606150305.1883410-1-hsinyi@chromium.org> MIME-Version: 1.0 X-Stat-Signature: 94xo579feuhckjaoq7h958489z16cgu4 Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="Oxd/anO5"; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf31.hostedemail.com: domain of hsinyi@chromium.org designates 209.85.210.175 as permitted sender) smtp.mailfrom=hsinyi@chromium.org X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 8B4A520085 X-HE-Tag: 1654527752-750742 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