diff options
author | Zhiguo Niu <[email protected]> | 2024-10-31 13:59:52 +0800 |
---|---|---|
committer | Jaegeuk Kim <[email protected]> | 2024-11-01 01:24:42 +0000 |
commit | 744e66cb8779fcbdbe20b0ec3235ef1ee9815261 (patch) | |
tree | 4aea17644257ce789ab7121dfb8eed5ed48c81e1 | |
parent | 51d3d952c5084393d89cce0b951bb5f18eb97bb1 (diff) |
f2fs: remove redundant atomic file check in defragment
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 <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
-rw-r--r-- | fs/f2fs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 0e7a0195eca8..b619f7e55640 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)) |