aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2020-05-05 11:55:03 -0500
committerAndreas Gruenbacher <agruenba@redhat.com>2020-05-08 18:49:04 +0200
commitc9cb9e381985bbbe8acd2695bbe6bd24bf06b81c (patch)
tree27333146aaede63dbb6659990b638a61d2708d1d /fs
parentgfs2: move privileged user check to gfs2_quota_lock_check (diff)
downloadwireguard-linux-c9cb9e381985bbbe8acd2695bbe6bd24bf06b81c.tar.xz
wireguard-linux-c9cb9e381985bbbe8acd2695bbe6bd24bf06b81c.zip
gfs2: don't call quota_unhold if quotas are not locked
Before this patch, function gfs2_quota_unlock checked if quotas are turned off, and if so, it branched to label out, which called gfs2_quota_unhold. With the new system of gfs2_qa_get and put, we no longer want to call gfs2_quota_unhold or we won't balance our gets and puts. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/quota.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index ed2e488f98b3..8259fef3f986 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1124,7 +1124,7 @@ void gfs2_quota_unlock(struct gfs2_inode *ip)
int found;
if (!test_and_clear_bit(GIF_QD_LOCKED, &ip->i_flags))
- goto out;
+ return;
for (x = 0; x < ip->i_qadata->qa_qd_num; x++) {
struct gfs2_quota_data *qd;
@@ -1161,7 +1161,6 @@ void gfs2_quota_unlock(struct gfs2_inode *ip)
qd_unlock(qda[x]);
}
-out:
gfs2_quota_unhold(ip);
}