mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
f2fs: convert to use sbi directly
[ Upstream commit c3355ea9d8 ]
F2FS_I_SB(inode) is redundant.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Stable-dep-of: b7d797d241c1 ("f2fs: compress: relocate some judgments in f2fs_reserve_compress_blocks")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
@@ -3462,7 +3462,7 @@ static int f2fs_release_compress_blocks(struct file *filp, unsigned long arg)
|
||||
int ret;
|
||||
int writecount;
|
||||
|
||||
if (!f2fs_sb_has_compression(F2FS_I_SB(inode)))
|
||||
if (!f2fs_sb_has_compression(sbi))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!f2fs_compressed_file(inode))
|
||||
@@ -3475,7 +3475,7 @@ static int f2fs_release_compress_blocks(struct file *filp, unsigned long arg)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
f2fs_balance_fs(F2FS_I_SB(inode), true);
|
||||
f2fs_balance_fs(sbi, true);
|
||||
|
||||
inode_lock(inode);
|
||||
|
||||
@@ -3644,7 +3644,7 @@ static int f2fs_reserve_compress_blocks(struct file *filp, unsigned long arg)
|
||||
unsigned int reserved_blocks = 0;
|
||||
int ret;
|
||||
|
||||
if (!f2fs_sb_has_compression(F2FS_I_SB(inode)))
|
||||
if (!f2fs_sb_has_compression(sbi))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (!f2fs_compressed_file(inode))
|
||||
@@ -3660,7 +3660,7 @@ static int f2fs_reserve_compress_blocks(struct file *filp, unsigned long arg)
|
||||
if (atomic_read(&F2FS_I(inode)->i_compr_blocks))
|
||||
goto out;
|
||||
|
||||
f2fs_balance_fs(F2FS_I_SB(inode), true);
|
||||
f2fs_balance_fs(sbi, true);
|
||||
|
||||
inode_lock(inode);
|
||||
|
||||
@@ -4070,7 +4070,7 @@ static int f2fs_ioc_decompress_file(struct file *filp, unsigned long arg)
|
||||
if (!f2fs_compressed_file(inode))
|
||||
return -EINVAL;
|
||||
|
||||
f2fs_balance_fs(F2FS_I_SB(inode), true);
|
||||
f2fs_balance_fs(sbi, true);
|
||||
|
||||
file_start_write(filp);
|
||||
inode_lock(inode);
|
||||
@@ -4142,7 +4142,7 @@ static int f2fs_ioc_compress_file(struct file *filp, unsigned long arg)
|
||||
if (!f2fs_compressed_file(inode))
|
||||
return -EINVAL;
|
||||
|
||||
f2fs_balance_fs(F2FS_I_SB(inode), true);
|
||||
f2fs_balance_fs(sbi, true);
|
||||
|
||||
file_start_write(filp);
|
||||
inode_lock(inode);
|
||||
|
||||
Reference in New Issue
Block a user