Skip to content

Commit f9615fe

Browse files
AstralBobAndreas Gruenbacher
authored andcommitted
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 <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent 2297ab6 commit f9615fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/gfs2/quota.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,9 @@ void gfs2_quota_change(struct gfs2_inode *ip, s64 change,
12701270
if (ip->i_diskflags & GFS2_DIF_SYSTEM)
12711271
return;
12721272

1273-
BUG_ON(ip->i_qadata->qa_ref <= 0);
1273+
if (gfs2_assert_withdraw(sdp, ip->i_qadata &&
1274+
ip->i_qadata->qa_ref > 0))
1275+
return;
12741276
for (x = 0; x < ip->i_qadata->qa_qd_num; x++) {
12751277
qd = ip->i_qadata->qa_qd[x];
12761278

0 commit comments

Comments
 (0)