Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp547635iof; Mon, 6 Jun 2022 08:17:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8oSLpAOmqvjOsvARSJ7dUV5usAb0kXpJw6aHZMNNLxqjNPm73FjuWM7gOzP6uSoviLgtz X-Received: by 2002:a63:9043:0:b0:3fc:7a8d:e744 with SMTP id a64-20020a639043000000b003fc7a8de744mr21774483pge.603.1654528644480; Mon, 06 Jun 2022 08:17:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654528644; cv=none; d=google.com; s=arc-20160816; b=sRag13rMrvWe5e/hkFIDYGAmCoTtEkgDW3dmFoWezOwqxpiQTsCv8BKtD3D8QLa94k +esZL6dS2ZkrXJE8/crES36gPCxxpgtqD44JjGtFvFMFohTgScFBr89sXWQEQesMJDUj Zc1B/mWbXjGbigojjLH+gC53qJSoNKsPjhRN4u0cNNfnpEbM2GRTexlHhqbD6zGBgZDU mMCj2JuOuWc73P6FPx67wPPKl3+N+ZDy1QNIYh2UKmufsDAw+AFxwbaBY5XCuneL71Vi 79FvWw46VaNJhhGnWpfa7/7o7sQZOsuuS1/9of4p/jGNOwoZoku5YjOYetb8LaPuwTQd xUPw== 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=pVK/jozl1uAfEzK6vleMbKcySwChksKYsG5Iw08IS/c=; b=VLvTTJ4653b6fF1EYf87oQqUhMtI4g1LtpXneW8Yw4OXs1C9jOCOcjudRy9eXtQ0Gx Uoc3Ajd1Z38nLQmro69AePiMMaOf0AZdOXAW2uWgpqdwpADm33KblQ3ni9px5325VuQO 07whTp1WVu+KmPh1EkbavmmjsD8HRae00rGhr6i5dpi+f2qQGyb9ju1j1VX6Z1oaMENI CJdro5y2W3r+vsmCAfI+zW+yvtBVpgvdX1JxCAcodd547O2lspzjT5RpIx0bt6oMMJuc HwjZ0TbkIxyilGD9Na7CuA55Y52EUwhuuOGT5YArCtJ9Dtff4xp/V1/x8/mA4b5S6yJF TKRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Oxd/anO5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m12-20020a170902f64c00b00161a5dc2ea8si20771361plg.612.2022.06.06.08.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 08:17:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Oxd/anO5"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 38A11186B90; Mon, 6 Jun 2022 08:03:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240292AbiFFPDV (ORCPT + 99 others); Mon, 6 Jun 2022 11:03:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240276AbiFFPDT (ORCPT ); Mon, 6 Jun 2022 11:03:19 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8EC61A43D0 for ; Mon, 6 Jun 2022 08:03:17 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id p8so12922104pfh.8 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=lhMfRjvRwDELU1zCeQi/Bu/m0AvhVidXo48HS8B1cnmUFbzDcYqb65ZRm1J1w2uRIp rQLyghJh8fWFYKT293y5+Kqd0PsA/vl7hYam5i10TAvsPCcJ05JKjPfmW2f0hRS/hPsg XtdRwGYzXSThDDdwfAR6oQOMvGpAzGCg1i5GlAiAx+WzEUTYLujieHemXKZNdYNXbAJz 4MAO3rMvzE/GsG0jDwe+vTRAqeOC58dtYKE8RawvGk/bywXQ2JNQeHj72nKyioLazu/+ 4V4ip9/Tueg/WeES3oSBQexhkpezJR0qI9MI/RQzgx1HjJyFhrZCisHYCLJ72HHtLsCJ xwvQ== X-Gm-Message-State: AOAM533kSzFxWplTCfU5b13pLa2q4HF+yjYUcGw5ll2ZrQdXoSqzzSAR 8tqc25esCWndC+0I0oMuDQnUNw== 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 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.255.ge46751e96f-goog