summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/inode.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2019-07-19 05:51:11 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2019-08-23 16:57:11 +0200
commit0f1898f93cdcb9275b7ab9c9931c5c21a8fd3d61 (patch)
treeb47a973a6f89d1129c20b9be56c164ba417fdb92 /fs/f2fs/inode.c
parentf2fs: fix to drop meta/node pages during umount (diff)
downloadlinux-0f1898f93cdcb9275b7ab9c9931c5c21a8fd3d61.tar.xz
linux-0f1898f93cdcb9275b7ab9c9931c5c21a8fd3d61.zip
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>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r--fs/f2fs/inode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index a33d7a849b2d..d1998ddf14fd 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -693,7 +693,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: