diff options
author | Chao Yu <yuchao0@huawei.com> | 2019-07-18 23:51:11 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-08-23 10:57:11 -0400 |
commit | 0f1898f93cdcb9275b7ab9c9931c5c21a8fd3d61 (patch) | |
tree | b47a973a6f89d1129c20b9be56c164ba417fdb92 | |
parent | a8933b6b68f775b5774e7b075447fae13f4d01fe (diff) |
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>
-rw-r--r-- | fs/f2fs/inode.c | 3 |
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: | |||
693 | 693 | ||
694 | if (err) { | 694 | if (err) { |
695 | f2fs_update_inode_page(inode); | 695 | f2fs_update_inode_page(inode); |
696 | set_sbi_flag(sbi, SBI_QUOTA_NEED_REPAIR); | 696 | if (dquot_initialize_needed(inode)) |
697 | set_sbi_flag(sbi, SBI_QUOTA_NEED_REPAIR); | ||
697 | } | 698 | } |
698 | sb_end_intwrite(inode->i_sb); | 699 | sb_end_intwrite(inode->i_sb); |
699 | no_delete: | 700 | no_delete: |