summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/quota/dquot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index d863d6b1ff97..85edbbafaaa4 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -2385,7 +2385,8 @@ int dquot_load_quota_sb(struct super_block *sb, int type, int format_id,
lockdep_assert_held_write(&sb->s_umount);
/* Just unsuspend quotas? */
- BUG_ON(flags & DQUOT_SUSPENDED);
+ if (WARN_ON_ONCE(flags & DQUOT_SUSPENDED))
+ return -EINVAL;
if (!fmt)
return -ESRCH;