diff options
author | Chao Yu <chao@kernel.org> | 2022-10-04 03:41:02 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-10-07 21:57:26 +0200 |
commit | b4dac1203f39821c6119033cdeebcea83cf45786 (patch) | |
tree | 951da5ab16c58dfac8fde7e14cd58abef9e6a15b /fs/f2fs/file.c | |
parent | f2fs: account swapfile inodes (diff) | |
download | linux-b4dac1203f39821c6119033cdeebcea83cf45786.tar.xz linux-b4dac1203f39821c6119033cdeebcea83cf45786.zip |
f2fs: change to use atomic_t type form sbi.atomic_files
inode_lock[ATOMIC_FILE] was used for protecting sbi->atomic_files,
update atomic_files variable's type to atomic_t instead of unsigned
int, then inode_lock[ATOMIC_FILE] can be obsoleted.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 7b3ed4a9bb46..ec9ee0f6d502 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2051,9 +2051,7 @@ static int f2fs_ioc_start_atomic_write(struct file *filp) } f2fs_i_size_write(fi->cow_inode, i_size_read(inode)); - spin_lock(&sbi->inode_lock[ATOMIC_FILE]); - sbi->atomic_files++; - spin_unlock(&sbi->inode_lock[ATOMIC_FILE]); + stat_inc_atomic_inode(inode); set_inode_flag(inode, FI_ATOMIC_FILE); set_inode_flag(fi->cow_inode, FI_COW_FILE); |