mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yue Hu <zbestahu@gmail.com>
To: xiang@kernel.org, chao@kernel.org, jefflexu@linux.alibaba.com,
	linux-erofs@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org, huyue2@coolpad.com, zhangwen@coolpad.com
Subject: [PATCH] erofs: move erofs_{allocpage,release_pages}() under CONFIG_EROFS_FS_ZIP
Date: Fri, 19 May 2023 10:33:13 +0800	[thread overview]
Message-ID: <20230519023313.24892-1-zbestahu@gmail.com> (raw)

From: Yue Hu <huyue2@coolpad.com>

These two functions are only used for compression side now. Also,
eliminate unused pagevec.h inclusion.

Signed-off-by: Yue Hu <huyue2@coolpad.com>
---
 fs/erofs/Makefile | 4 ++--
 fs/erofs/utils.c  | 3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/erofs/Makefile b/fs/erofs/Makefile
index a3a98fc3e481..1b1c3e3127cd 100644
--- a/fs/erofs/Makefile
+++ b/fs/erofs/Makefile
@@ -1,8 +1,8 @@
 # SPDX-License-Identifier: GPL-2.0-only
 
 obj-$(CONFIG_EROFS_FS) += erofs.o
-erofs-objs := super.o inode.o data.o namei.o dir.o utils.o sysfs.o
+erofs-objs := super.o inode.o data.o namei.o dir.o sysfs.o
 erofs-$(CONFIG_EROFS_FS_XATTR) += xattr.o
-erofs-$(CONFIG_EROFS_FS_ZIP) += decompressor.o zmap.o zdata.o pcpubuf.o
+erofs-$(CONFIG_EROFS_FS_ZIP) += decompressor.o zmap.o zdata.o utils.o pcpubuf.o
 erofs-$(CONFIG_EROFS_FS_ZIP_LZMA) += decompressor_lzma.o
 erofs-$(CONFIG_EROFS_FS_ONDEMAND) += fscache.o
diff --git a/fs/erofs/utils.c b/fs/erofs/utils.c
index 46627cb69abe..72ba7daba33c 100644
--- a/fs/erofs/utils.c
+++ b/fs/erofs/utils.c
@@ -4,7 +4,6 @@
  *             https://www.huawei.com/
  */
 #include "internal.h"
-#include <linux/pagevec.h>
 
 struct page *erofs_allocpage(struct page **pagepool, gfp_t gfp)
 {
@@ -29,7 +28,6 @@ void erofs_release_pages(struct page **pagepool)
 	}
 }
 
-#ifdef CONFIG_EROFS_FS_ZIP
 /* global shrink count (for all mounted EROFS instances) */
 static atomic_long_t erofs_global_shrink_cnt;
 
@@ -289,4 +287,3 @@ void erofs_exit_shrinker(void)
 {
 	unregister_shrinker(&erofs_shrinker_info);
 }
-#endif	/* !CONFIG_EROFS_FS_ZIP */
-- 
2.17.1


             reply	other threads:[~2023-05-19  2:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19  2:33 Yue Hu [this message]
2023-05-19  2:36 ` Gao Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230519023313.24892-1-zbestahu@gmail.com \
    --to=zbestahu@gmail.com \
    --cc=chao@kernel.org \
    --cc=huyue2@coolpad.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiang@kernel.org \
    --cc=zhangwen@coolpad.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®