Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1717426ioo; Mon, 23 May 2022 01:20:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDhcMGHD7ougXK/2NnS5hKhDRa3Z0KQtnw9QSNd3ITMTkaKrqRYBCqedbocomGFYvRQC4w X-Received: by 2002:a63:84c3:0:b0:3fa:6391:28fa with SMTP id k186-20020a6384c3000000b003fa639128famr2483762pgd.574.1653294038944; Mon, 23 May 2022 01:20:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653294038; cv=none; d=google.com; s=arc-20160816; b=AwJnO3MKf9eRv6SecrcTzahEbmLLJLV2Y81xNXpngERhw6wnUimbZ38ATiQr9s5oNt eK84gbfE9ToH3CfDfaHCBStAzM/FL0rgq1Gh3yTf778s7dCSR0uS2728tQ5APJ6pEMlV 59oIlYQ+mDS7kgm3jJFOeli5ps6rdWB7/kvEvH5EP4P0Y8PgsPnOHqVrWebFqCtwsjAF N9505r9A92eb7jKRacrjTQijNV0FhjlQ1mMqN/enM0lAWyKrDf1s06NxtBSQ8dbw0ED3 zwqLXyMSVGXJMCnRzMsESh0MXWEVfB9MtN9JzXHdqQ0aVKaigXZpIKopBe0hH4Hc83yi nD0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=l9zzjHGygGfmD2mjiCjABBiOJyHxbV3Xb2gkS3Lpi4w=; b=WO6lubUZEbEMqMH2W0kAApUahF507wsenta6tzcPs+Ns7LXAJ5P/hGV+BezfFho+h2 NLb6EsXeqjxWP5MvJgNJ61F5V2BOKbsfAtHojcUQWyx8JqpUl6w+o3bX6FPgd7oq06B8 YV/GUJmc2B1U9x6MxQyrsbMTKzb3goqBnwIljg2qkHnSXlmcDf6zWaB0Mi8PIMfSqFmB CJT3AjKGI2b++uvW0tEQ91xpanOD56ORqaNC6SUCMiujQHE2/eBoK3jK6+5djPc3d39p BU+/REFH8AF32NrbT5gxijktTuYrCFgt29MfjSa0S3h9YJ3iY5+8lDyYAErh/o9h7sNM nftw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iQ6M1fZ5; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v1-20020a17090a088100b001d03c08b551si11240311pjc.190.2022.05.23.01.20.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 01:20:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=iQ6M1fZ5; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3D8773A5F9; Mon, 23 May 2022 00:24:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbiEWHYA (ORCPT + 99 others); Mon, 23 May 2022 03:24:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbiEWHWT (ORCPT ); Mon, 23 May 2022 03:22:19 -0400 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC10110559 for ; Mon, 23 May 2022 00:13:57 -0700 (PDT) Received: by mail-oi1-x233.google.com with SMTP id r68so2602958oie.12 for ; Mon, 23 May 2022 00:13:57 -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=l9zzjHGygGfmD2mjiCjABBiOJyHxbV3Xb2gkS3Lpi4w=; b=iQ6M1fZ5Q3+FC+7blG98I3zIIvX/yTF2CLpnO+Hh13i/JAHcQd87xBGJTrWupW27XH Sb1AwdIpu2meybIIwwOeh6fZAOUOQu5fRyD4FaoWpcCzLONtTAcyZs5cXuuRotq2WTUE 3xdrV3vWw3+v0DzRExLgBNJncwKj+Sm+Aj8vY= 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=l9zzjHGygGfmD2mjiCjABBiOJyHxbV3Xb2gkS3Lpi4w=; b=KaS/+yFhXYyB5qFG6CbV5tEfpR07GO/PL3mjRcaZuaKZrF80D2PKK3WZSY/nexkGTz ufsuycEty7+QXI+yVhAPodLwGsCJKxn2u0ucyZB199oaGFWxlr5ajq7e4uFURJZdpK+8 luv/hZA9Ranwfs1d+tooVHZ+qcJ41JpKhltfQ48J9gpyAAEhQDFXoRcjl6IuBEir+rbM PFN2QD6tU86fsdW66rSUpUS5b/egdMZfKF+LBQvl5lb/awlARBJZIcEW0PVDfNXUm0Kq HWyNpMSWLcJMA5G14G5E7FAeRgwyACziIhFY0QrQZb4io/EMsu/dJA84mJgadv6vPmaU YdfQ== X-Gm-Message-State: AOAM533l0dkTccWA7FtjaVA3d3Ssqu+PSu9tQQHceXkKydZY7W6YnJBe WSwJh8/g80TzbaTiWv9Ms3Eppq8+qM895Q== X-Received: by 2002:a17:90a:1b6c:b0:1df:6940:e856 with SMTP id q99-20020a17090a1b6c00b001df6940e856mr25130152pjq.240.1653289201243; Mon, 23 May 2022 00:00:01 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:76d5:494d:1690:d003]) by smtp.gmail.com with ESMTPSA id m2-20020a629402000000b005180f4733a8sm3099527pfe.106.2022.05.22.23.59.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 00:00:00 -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 v3 2/3] squashfs: always build "file direct" version of page actor Date: Mon, 23 May 2022 14:59:11 +0800 Message-Id: <20220523065909.883444-3-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.124.g0e6072fb45-goog In-Reply-To: <20220523065909.883444-1-hsinyi@chromium.org> References: <20220523065909.883444-1-hsinyi@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.36.1.124.g0e6072fb45-goog