Skip to content

Commit dac0fc3

Browse files
AstralBobAndreas Gruenbacher
authored andcommitted
gfs2: Fix gfs2_qa_get imbalance in gfs2_quota_hold
This patch fixes a case in which function gfs2_quota_hold encounters an assert error and exits. The lack of gfs2_qa_put causes further problems when the inode is evicted and the get/put count is non-zero. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 9b62042 commit dac0fc3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/gfs2/quota.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ int gfs2_quota_hold(struct gfs2_inode *ip, kuid_t uid, kgid_t gid)
591591
if (gfs2_assert_warn(sdp, !ip->i_qadata->qa_qd_num) ||
592592
gfs2_assert_warn(sdp, !test_bit(GIF_QD_LOCKED, &ip->i_flags))) {
593593
error = -EIO;
594+
gfs2_qa_put(ip);
594595
goto out;
595596
}
596597

0 commit comments

Comments
 (0)