diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 408434e253c9..fc0f69fa702d 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2485,7 +2485,7 @@ int f2fs_quota_sync(struct super_block *sb, int type) struct f2fs_sb_info *sbi = F2FS_SB(sb); struct quota_info *dqopt = sb_dqopt(sb); int cnt; - int ret; + int ret = 0; /* * Now when everything is written we can discard the pagecache so @@ -2496,8 +2496,8 @@ int f2fs_quota_sync(struct super_block *sb, int type) if (type != -1 && cnt != type) continue; - if (!sb_has_quota_active(sb, type)) - return 0; + if (!sb_has_quota_active(sb, cnt)) + continue; inode_lock(dqopt->files[cnt]);