diff options
author | Jan Kara <jack@suse.cz> | 2023-10-20 13:21:24 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2024-01-22 12:56:20 +0100 |
commit | c8238508c85e262d46e19e2ff039d9238d436321 (patch) | |
tree | aa46e32d5c007314703fd9aebae57dfd98ab78d1 /fs/quota/dquot.c | |
parent | 6613476e225e090cc9aad49be7fa504e290dd33d (diff) |
quota: Replace BUG_ON in dqput()
The BUG_ON in dqput() will likely take the whole machine down when it
hits. Replace it with WARN_ON_ONCE() instead and stop hiding that behind
CONFIG_QUOTA_DEBUG.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/quota/dquot.c')
-rw-r--r-- | fs/quota/dquot.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 1f0c754416b6..d863d6b1ff97 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -875,10 +875,7 @@ void dqput(struct dquot *dquot) } /* Need to release dquot? */ -#ifdef CONFIG_QUOTA_DEBUG - /* sanity check */ - BUG_ON(!list_empty(&dquot->dq_free)); -#endif + WARN_ON_ONCE(!list_empty(&dquot->dq_free)); put_releasing_dquots(dquot); atomic_dec(&dquot->dq_count); spin_unlock(&dq_list_lock); |