summaryrefslogtreecommitdiff
path: root/fs/gfs2
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2023-06-16 21:22:04 +0300
committerAndreas Gruenbacher <agruenba@redhat.com>2023-09-05 16:58:18 +0300
commit0e072cac92d08c05257432b10fa8cd66d64b3f43 (patch)
treee944552fa34e34594bbca6a3d4a1dc387a1770e8 /fs/gfs2
parent06aa6fd31a5f402b055e12ea53bb7b086359d3c8 (diff)
downloadlinux-0e072cac92d08c05257432b10fa8cd66d64b3f43.tar.xz
gfs2: change qd_slot_count to qd_slot_ref
Variable qd_slot_count is a reference count, not a count of slots. This patch renames it to qd_slot_ref to make that more clear. 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/incore.h2
-rw-r--r--fs/gfs2/quota.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 7e94cf3562d6..a8c95c5293c6 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -452,7 +452,7 @@ struct gfs2_quota_data {
s64 qd_change_sync;
unsigned int qd_slot;
- unsigned int qd_slot_count;
+ unsigned int qd_slot_ref;
struct buffer_head *qd_bh;
struct gfs2_quota_change *qd_bh_qc;
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 6f6e3493b5fa..5160e5c36980 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -130,7 +130,7 @@ static void gfs2_qd_dispose(struct gfs2_quota_data *qd)
if (!gfs2_withdrawn(sdp)) {
gfs2_assert_warn(sdp, !qd->qd_change);
- gfs2_assert_warn(sdp, !qd->qd_slot_count);
+ gfs2_assert_warn(sdp, !qd->qd_slot_ref);
gfs2_assert_warn(sdp, !qd->qd_bh_count);
}
@@ -342,7 +342,7 @@ static int slot_get(struct gfs2_quota_data *qd)
int error = 0;
spin_lock(&sdp->sd_bitmap_lock);
- if (qd->qd_slot_count == 0) {
+ if (qd->qd_slot_ref == 0) {
bit = find_first_zero_bit(sdp->sd_quota_bitmap,
sdp->sd_quota_slots);
if (bit >= sdp->sd_quota_slots) {
@@ -352,7 +352,7 @@ static int slot_get(struct gfs2_quota_data *qd)
set_bit(bit, sdp->sd_quota_bitmap);
qd->qd_slot = bit;
}
- qd->qd_slot_count++;
+ qd->qd_slot_ref++;
out:
spin_unlock(&sdp->sd_bitmap_lock);
return error;
@@ -363,8 +363,8 @@ static void slot_hold(struct gfs2_quota_data *qd)
struct gfs2_sbd *sdp = qd->qd_sbd;
spin_lock(&sdp->sd_bitmap_lock);
- gfs2_assert(sdp, qd->qd_slot_count);
- qd->qd_slot_count++;
+ gfs2_assert(sdp, qd->qd_slot_ref);
+ qd->qd_slot_ref++;
spin_unlock(&sdp->sd_bitmap_lock);
}
@@ -373,8 +373,8 @@ static void slot_put(struct gfs2_quota_data *qd)
struct gfs2_sbd *sdp = qd->qd_sbd;
spin_lock(&sdp->sd_bitmap_lock);
- gfs2_assert(sdp, qd->qd_slot_count);
- if (!--qd->qd_slot_count) {
+ gfs2_assert(sdp, qd->qd_slot_ref);
+ if (!--qd->qd_slot_ref) {
BUG_ON(!test_and_clear_bit(qd->qd_slot, sdp->sd_quota_bitmap));
qd->qd_slot = -1;
}
@@ -1446,7 +1446,7 @@ int gfs2_quota_init(struct gfs2_sbd *sdp)
set_bit(QDF_CHANGE, &qd->qd_flags);
qd->qd_change = qc_change;
qd->qd_slot = slot;
- qd->qd_slot_count = 1;
+ qd->qd_slot_ref = 1;
spin_lock(&qd_lock);
BUG_ON(test_and_set_bit(slot, sdp->sd_quota_bitmap));