diff options
author | Chao Yu <chao@kernel.org> | 2021-08-24 08:11:38 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-08-30 10:12:47 -0700 |
commit | d75da8c8a4c5c761936e4a51403f5f21e3aba935 (patch) | |
tree | 2031166f701bb1d898066ace9ffa432f2784e3ca /fs/f2fs | |
parent | 4d67490498acb4ffcef5ba7bc44990d46e66a44c (diff) | |
download | linux-d75da8c8a4c5c761936e4a51403f5f21e3aba935.tar.gz linux-d75da8c8a4c5c761936e4a51403f5f21e3aba935.tar.bz2 linux-d75da8c8a4c5c761936e4a51403f5f21e3aba935.zip |
f2fs: adjust unlock order for cleanup
This patch adjusts unlock order of .i_mmap_sem and .i_gc_rwsem for
cleanup.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index ab4ea2ddcc8b..cc2080866c54 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -3497,8 +3497,8 @@ static int f2fs_release_compress_blocks(struct file *filp, unsigned long arg) released_blocks += ret; } - up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]); up_write(&F2FS_I(inode)->i_mmap_sem); + up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]); out: inode_unlock(inode); @@ -3650,8 +3650,8 @@ static int f2fs_reserve_compress_blocks(struct file *filp, unsigned long arg) reserved_blocks += ret; } - up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]); up_write(&F2FS_I(inode)->i_mmap_sem); + up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]); if (ret >= 0) { clear_inode_flag(inode, FI_COMPRESS_RELEASED); |