mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 15:10:38 +00:00
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>
This commit is contained in:
parent
4d67490498
commit
d75da8c8a4
@ -3497,8 +3497,8 @@ static int f2fs_release_compress_blocks(struct file *filp, unsigned long arg)
|
|||||||
released_blocks += ret;
|
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_mmap_sem);
|
||||||
|
up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
|
||||||
out:
|
out:
|
||||||
inode_unlock(inode);
|
inode_unlock(inode);
|
||||||
|
|
||||||
@ -3650,8 +3650,8 @@ static int f2fs_reserve_compress_blocks(struct file *filp, unsigned long arg)
|
|||||||
reserved_blocks += ret;
|
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_mmap_sem);
|
||||||
|
up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
|
||||||
|
|
||||||
if (ret >= 0) {
|
if (ret >= 0) {
|
||||||
clear_inode_flag(inode, FI_COMPRESS_RELEASED);
|
clear_inode_flag(inode, FI_COMPRESS_RELEASED);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user