diff options
author | Bob Peterson <rpeterso@redhat.com> | 2020-05-05 18:50:24 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2020-05-08 18:45:12 +0200 |
commit | f9615fe3113f1067093f7f68d46d281b4c9a5978 (patch) | |
tree | c0ef43ea9a8c168aa00a233265625014aa40dec8 /fs/gfs2 | |
parent | gfs2: Fix problems regarding gfs2_qa_get and _put (diff) | |
download | linux-f9615fe3113f1067093f7f68d46d281b4c9a5978.tar.xz linux-f9615fe3113f1067093f7f68d46d281b4c9a5978.zip |
gfs2: Change BUG_ON to an assert_withdraw in gfs2_quota_change
Before this patch, gfs2_quota_change() would BUG_ON if the
qa_ref counter was not a positive number. This patch changes it to
be a withdraw instead. That way we can debug things more easily.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/quota.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index cc0c4b5800be..a62be4267c17 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -1270,7 +1270,9 @@ void gfs2_quota_change(struct gfs2_inode *ip, s64 change, if (ip->i_diskflags & GFS2_DIF_SYSTEM) return; - BUG_ON(ip->i_qadata->qa_ref <= 0); + if (gfs2_assert_withdraw(sdp, ip->i_qadata && + ip->i_qadata->qa_ref > 0)) + return; for (x = 0; x < ip->i_qadata->qa_qd_num; x++) { qd = ip->i_qadata->qa_qd[x]; |