diff options
author | Chao Yu <chao.yu@oppo.com> | 2022-08-04 16:38:21 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-08-05 14:20:02 +0300 |
commit | e53f8643474a32ddfcfd04e5b22613fdd2a92a52 (patch) | |
tree | c5b6683d20c561eaf5abbd3603cd7167786d6e45 /fs/f2fs/file.c | |
parent | bff139b49d9f70c1ac5384aac94554846aa834de (diff) | |
download | linux-e53f8643474a32ddfcfd04e5b22613fdd2a92a52.tar.xz |
f2fs: clean up f2fs_abort_atomic_write()
f2fs_abort_atomic_write() has checked whether current inode is
atomic_write one or not, it's redundant to check in its caller,
remove it for cleanup.
Signed-off-by: Chao Yu <chao.yu@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 0c984718f3c5..24f5b02c78e7 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1822,8 +1822,7 @@ static int f2fs_release_file(struct inode *inode, struct file *filp) atomic_read(&inode->i_writecount) != 1) return 0; - if (f2fs_is_atomic_file(inode)) - f2fs_abort_atomic_write(inode, true); + f2fs_abort_atomic_write(inode, true); return 0; } @@ -1837,8 +1836,7 @@ static int f2fs_file_flush(struct file *file, fl_owner_t id) * until all the writers close its file. Since this should be done * before dropping file lock, it needs to do in ->flush. */ - if (f2fs_is_atomic_file(inode) && - F2FS_I(inode)->atomic_write_task == current) + if (F2FS_I(inode)->atomic_write_task == current) f2fs_abort_atomic_write(inode, true); return 0; } @@ -2124,8 +2122,7 @@ static int f2fs_ioc_abort_atomic_write(struct file *filp) inode_lock(inode); - if (f2fs_is_atomic_file(inode)) - f2fs_abort_atomic_write(inode, true); + f2fs_abort_atomic_write(inode, true); inode_unlock(inode); |