mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
f2fs: call f2fs_balance_fs for setattr
If inode becomes dirty, we need to check the # of dirty inodes whether or not further checkpoint would be required. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
b9610bdfcb
commit
15d0435455
1 changed files with 4 additions and 1 deletions
|
|
@ -694,7 +694,6 @@ int f2fs_setattr(struct dentry *dentry, struct iattr *attr)
|
|||
err = f2fs_truncate(inode);
|
||||
if (err)
|
||||
return err;
|
||||
f2fs_balance_fs(F2FS_I_SB(inode), true);
|
||||
} else {
|
||||
/*
|
||||
* do not trim all blocks after i_size if target size is
|
||||
|
|
@ -723,6 +722,10 @@ int f2fs_setattr(struct dentry *dentry, struct iattr *attr)
|
|||
}
|
||||
|
||||
f2fs_mark_inode_dirty_sync(inode);
|
||||
|
||||
/* inode change will produce dirty node pages flushed by checkpoint */
|
||||
f2fs_balance_fs(F2FS_I_SB(inode), true);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue