quota: Remove BUG_ON from dqget()
[ Upstream commit 249f374eb9b6b969c64212dd860cc1439674c4a8 ] dqget() checks whether dquot->dq_sb is set when returning it using BUG_ON. Firstly this doesn't work as an invalidation check for quite some time (we release dquot with dq_sb set these days), secondly using BUG_ON is quite harsh. Use WARN_ON_ONCE and check whether dquot is still hashed instead. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
13678d764f
commit
86ec403638
1 changed files with 2 additions and 3 deletions
|
@ -997,9 +997,8 @@ we_slept:
|
||||||
* smp_mb__before_atomic() in dquot_acquire().
|
* smp_mb__before_atomic() in dquot_acquire().
|
||||||
*/
|
*/
|
||||||
smp_rmb();
|
smp_rmb();
|
||||||
#ifdef CONFIG_QUOTA_DEBUG
|
/* Has somebody invalidated entry under us? */
|
||||||
BUG_ON(!dquot->dq_sb); /* Has somebody invalidated entry under us? */
|
WARN_ON_ONCE(hlist_unhashed(&dquot->dq_hash));
|
||||||
#endif
|
|
||||||
out:
|
out:
|
||||||
if (empty)
|
if (empty)
|
||||||
do_destroy_dquot(empty);
|
do_destroy_dquot(empty);
|
||||||
|
|
Loading…
Add table
Reference in a new issue