Skip to content

Commit c823850

Browse files
committed
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 <[email protected]>
1 parent 6613476 commit c823850

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fs/quota/dquot.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -875,10 +875,7 @@ void dqput(struct dquot *dquot)
875875
}
876876

877877
/* Need to release dquot? */
878-
#ifdef CONFIG_QUOTA_DEBUG
879-
/* sanity check */
880-
BUG_ON(!list_empty(&dquot->dq_free));
881-
#endif
878+
WARN_ON_ONCE(!list_empty(&dquot->dq_free));
882879
put_releasing_dquots(dquot);
883880
atomic_dec(&dquot->dq_count);
884881
spin_unlock(&dq_list_lock);

0 commit comments

Comments
 (0)