diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 6a7b7d44753a..9b8babbd1653 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -997,9 +997,8 @@ struct dquot *dqget(struct super_block *sb, struct kqid qid) * smp_mb__before_atomic() in dquot_acquire(). */ smp_rmb(); -#ifdef CONFIG_QUOTA_DEBUG - BUG_ON(!dquot->dq_sb); /* Has somebody invalidated entry under us? */ -#endif + /* Has somebody invalidated entry under us? */ + WARN_ON_ONCE(hlist_unhashed(&dquot->dq_hash)); out: if (empty) do_destroy_dquot(empty);