diff options
author | Bob Peterson <rpeterso@redhat.com> | 2023-05-15 11:37:57 -0500 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2023-06-06 18:35:06 +0200 |
commit | dac0fc31bea78e3ac1467d2fdb49ffff37e95e84 (patch) | |
tree | 71e3e1b0dff5325b8c21875d86627c1209bffa73 /fs/gfs2/quota.c | |
parent | 9b620429eca9a1dbadf6cf983b11d2cb427411ce (diff) |
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>
Diffstat (limited to 'fs/gfs2/quota.c')
-rw-r--r-- | fs/gfs2/quota.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 1ed17226d9ed..386ca770ce2e 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -591,6 +591,7 @@ int gfs2_quota_hold(struct gfs2_inode *ip, kuid_t uid, kgid_t gid) if (gfs2_assert_warn(sdp, !ip->i_qadata->qa_qd_num) || gfs2_assert_warn(sdp, !test_bit(GIF_QD_LOCKED, &ip->i_flags))) { error = -EIO; + gfs2_qa_put(ip); goto out; } |