The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 1/2] f2fs: remove redundant atomic file check in defragment
@ 2024-10-31  5:59 Zhiguo Niu
  2024-10-31  5:59 ` [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: linux-f2fs-devel, linux-kernel, niuzhiguo84, zhiguo.niu, ke.wang,
	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


^ 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 [PATCH 1/2] f2fs: remove redundant atomic file check in defragment Zhiguo Niu
2024-10-31  5:59 ` [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap Zhiguo Niu
2024-11-01  2:36   ` Chao Yu
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
2024-11-07 20:30 ` patchwork-bot+f2fs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox