From patchwork Fri Jun 17 08:38:11 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: 12885294 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 8C1DDC433EF for ; Fri, 17 Jun 2022 08:38:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0AF816B0082; Fri, 17 Jun 2022 04:38:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 00B806B0083; Fri, 17 Jun 2022 04:38:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DEE476B0085; Fri, 17 Jun 2022 04:38:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id CB5376B0082 for ; Fri, 17 Jun 2022 04:38:55 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 98C66939 for ; Fri, 17 Jun 2022 08:38:55 +0000 (UTC) X-FDA: 79587077430.10.4A37E6B Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by imf11.hostedemail.com (Postfix) with ESMTP id 2A64F40086 for ; Fri, 17 Jun 2022 08:38:55 +0000 (UTC) Received: by mail-pf1-f172.google.com with SMTP id u2so3623821pfc.2 for ; Fri, 17 Jun 2022 01:38:54 -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=zopK+BvSuamYvb8kkpPXiSJpoMOkgUyTWgxXUH/cCsw=; b=GpjdkIbTWWbrZUCBW7rlQQdUuuBvKFDKBuLlaoY5VjEUH10jMZXq59WS6tJnFqEgfL c2058J9vJgcrlylt8KFriWP/rA4D2Tzv8GF0nE7LdoNrmnUfvxYWAlDgXRm62NqnITvI SgKeEyr4pOBraKH9bjFC+FgB/1ZzI5FGuLBG4= 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=zopK+BvSuamYvb8kkpPXiSJpoMOkgUyTWgxXUH/cCsw=; b=WINxZT6gc0TdvJi7eLwQIukjh5Y6KhaLP/B0bni1mH8/w6TsiKRJTjRsTg55bQ0SwF hxbYNf8AavxLFt3AUpEiQJ/wUuxbWp7iExEugkXb3UVVPtmZ0LMKsIOgyXH754KEpTLv wKmCCQLqZNIgeQlrL/h08WF7sbFZl2JwiqA79xk32kxhXV8avvhpJnGyiQYVT7zaVrY1 9bRnuLx7Pmb4aZCHgRbuEFCsGN6wj06FBkOar6jsZ214D3MMsdTeKPcLLL6NNYPU3wUH zPEguMw+xxg0MAFjE71lNumQ/UrdgtcXWQwVIdb5jx9Wj3tWIkgG4+gI+e/IEAuCCbGf 3tCA== X-Gm-Message-State: AJIora+bFEdX76uearVUCw0I6p+yeK1VrNNFlIuufuM15bvOnOVP1rJA SEyafYYyzjWVyAAxw05Xz0JF2A== X-Google-Smtp-Source: AGRyM1uPYLhqbv/0uKLCtUWT/6Sgfvzcvfo4kaPqSj6W9uUwVrFuRA9YUyKPuKXoe5ttY3bo9JJPng== X-Received: by 2002:a05:6a00:1502:b0:51c:2991:f1c with SMTP id q2-20020a056a00150200b0051c29910f1cmr8765805pfu.37.1655455134146; Fri, 17 Jun 2022 01:38:54 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:a0dc:9427:fea8:f78a]) by smtp.gmail.com with ESMTPSA id d12-20020a62f80c000000b005185407eda5sm3154103pfh.44.2022.06.17.01.38.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 01:38:53 -0700 (PDT) From: Hsin-Yi Wang To: Phillip Lougher , Matthew Wilcox , Marek Szyprowski , Andrew Morton Cc: Xiongwei Song , Zheng Liang , Zhang Yi , Hou Tao , Miao Xie , "linux-mm @ kvack . org" , "squashfs-devel @ lists . sourceforge . net" , linux-kernel@vger.kernel.org Subject: [PATCH v7 2/4] squashfs: always build "file direct" version of page actor Date: Fri, 17 Jun 2022 16:38:11 +0800 Message-Id: <20220617083810.337573-3-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog In-Reply-To: <20220617083810.337573-1-hsinyi@chromium.org> References: <20220617083810.337573-1-hsinyi@chromium.org> MIME-Version: 1.0 ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=GpjdkIbT; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf11.hostedemail.com: domain of hsinyi@chromium.org designates 209.85.210.172 as permitted sender) smtp.mailfrom=hsinyi@chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655455135; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zopK+BvSuamYvb8kkpPXiSJpoMOkgUyTWgxXUH/cCsw=; b=NDev24n6U5svwiOw5O9y6UHM5Touf3/gtYwIRV1Q17ZQqseQ9J41WS++1I82Kq15v+Sci2 oXm2CUH7Iqn63Hj4RtxaK71maZWD+Yg/8O7t1rM3U9kfapPZyNgk1909jWrnigQrqdKxH2 0p4bd7LyVOwWAW4cpK5LCHNy/H094GU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655455135; a=rsa-sha256; cv=none; b=KCuVS0T9SMe8dr5geYUdhcaCPofZG88LIAgqBYGjCsYEe+bWMunh6r3mR/hIq0OVJMIluO LLBc5cZyIpF5HZSu1SB2/y7gfNtd2k9PYXfMzAPQ7OmzsVC1IYbebBRohmU/exnh+KoKVt myMhv+phDZqMU8hMJB9ypRchfX5Ji8A= X-Stat-Signature: wqsfowjfnp9zqu8sobptqgwmpumrczpg X-Rspamd-Queue-Id: 2A64F40086 X-Rspam-User: Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=GpjdkIbT; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf11.hostedemail.com: domain of hsinyi@chromium.org designates 209.85.210.172 as permitted sender) smtp.mailfrom=hsinyi@chromium.org X-Rspamd-Server: rspam10 X-HE-Tag: 1655455135-785399 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 | 46 ---------------------------------------- 2 files changed, 2 insertions(+), 48 deletions(-) diff --git a/fs/squashfs/Makefile b/fs/squashfs/Makefile index 7bd9b8b856d0b..477c89a519ee8 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 37523c54256fa..24841d28bc0fb 100644 --- a/fs/squashfs/page_actor.h +++ b/fs/squashfs/page_actor.h @@ -6,51 +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 */ -} - -static inline void squashfs_actor_nobuff(struct squashfs_page_actor *actor) -{ - /* empty */ -} -#else struct squashfs_page_actor { union { void **buffer; @@ -91,4 +46,3 @@ static inline void squashfs_actor_nobuff(struct squashfs_page_actor *actor) actor->alloc_buffer = 0; } #endif -#endif