diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 7cf0daa6a58d..924dbac1bb5c 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2705,7 +2705,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 @@ -2716,8 +2716,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]);