f2fs: fix to avoid tagging SBI_QUOTA_NEED_REPAIR incorrectly

On a quota disabled image, with fault injection, SBI_QUOTA_NEED_REPAIR
will be set incorrectly in error path of f2fs_evict_inode(), fix it.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Chao Yu
2019-07-19 11:51:11 +08:00
committed by Jaegeuk Kim
parent d7895f7914
commit d7be5b042f

View File

@@ -695,7 +695,8 @@ retry:
if (err) {
f2fs_update_inode_page(inode);
set_sbi_flag(sbi, SBI_QUOTA_NEED_REPAIR);
if (dquot_initialize_needed(inode))
set_sbi_flag(sbi, SBI_QUOTA_NEED_REPAIR);
}
sb_end_intwrite(inode->i_sb);
no_delete: