[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230524114159.8999-1-hanqi@vivo.com>
Date: Wed, 24 May 2023 19:41:59 +0800
From: Qi Han <hanqi@...o.com>
To: jaegeuk@...nel.org, chao@...nel.org
Cc: linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, Qi Han <hanqi@...o.com>
Subject: [PATCH] f2fs: allows setting compress option to files which marked with FI_MMAP_FILE
Allow to compress mmap files in commit e3c548323d32 ("f2fs: let's
allow compression for mmap files"). However, we cannot set the
compress option to the mmap file. To keep the same concept in both
compress_modes, f2fs_ioc_set_compress_option should also allow it.
Let's remove checking mmap files in f2fs_ioc_set_compress_option so
that we can set compress option to the mmap files.
Signed-off-by: Qi Han <hanqi@...o.com>
---
fs/f2fs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 5ac53d2627d2..3a97b753a074 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3957,7 +3957,7 @@ static int f2fs_ioc_set_compress_option(struct file *filp, unsigned long arg)
file_start_write(filp);
inode_lock(inode);
- if (f2fs_is_mmap_file(inode) || get_dirty_pages(inode)) {
+ if (get_dirty_pages(inode)) {
ret = -EBUSY;
goto out;
}
--
2.39.0
Powered by blists - more mailing lists