All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment
@ 2024-10-31  5:59 Zhiguo Niu
  2024-10-31  5:59 ` [f2fs-dev] [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap Zhiguo Niu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Zhiguo Niu @ 2024-10-31  5:59 UTC (permalink / raw)
  To: jaegeuk, chao
  Cc: ke.wang, linux-kernel, linux-f2fs-devel, zhiguo.niu, Hao_hao.Wang

f2fs_is_atomic_file(inode) is checked in f2fs_defragment_range,
so remove the redundant checking in f2fs_ioc_defragment.

Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.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 75a8b22..3e22f6e 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2883,7 +2883,7 @@ static int f2fs_ioc_defragment(struct file *filp, unsigned long arg)
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;
 
-	if (!S_ISREG(inode->i_mode) || f2fs_is_atomic_file(inode))
+	if (!S_ISREG(inode->i_mode))
 		return -EINVAL;
 
 	if (f2fs_readonly(sbi->sb))
-- 
1.9.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-11-07 20:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-31  5:59 [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment Zhiguo Niu
2024-10-31  5:59 ` [f2fs-dev] [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap Zhiguo Niu
2024-11-01  2:36   ` Chao Yu via Linux-f2fs-devel
2024-11-01  3:27     ` Zhiguo Niu
2024-11-01  5:48       ` Zhiguo Niu
2024-11-01  8:00     ` Zhiguo Niu
2024-10-31  7:52 ` [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment Chao Yu via Linux-f2fs-devel
2024-11-07 20:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.