aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorBob Peterson2023-08-30 07:57:47 -0500
committerAndreas Gruenbacher2023-09-05 15:58:18 +0200
commit9f494e9bdcc54eaed94fcc8fe5d4d5a51c36834c (patch)
treeaadba00c4671998860ce21ab6a3fb92981cc739d /fs
parent2a4f651167560adae05e644e41d2666d727c549b (diff)
gfs2: Don't try to sync non-changes
Function need_sync is supposed to determine if a qd element needs to be synced. If the "change" (qd_change) is zero, it does not need to be synced because there's literally no change in the value. Before this patch need_sync returned false if value < 0. That should be <= 0. This patch changes the check to <=. 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index fa1d48d5c112..9be210f3dbd8 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1126,7 +1126,7 @@ static bool need_sync(struct gfs2_quota_data *qd)
den = gt->gt_quota_scale_den;
spin_unlock(&gt->gt_spin);
- if (value < 0)
+ if (value <= 0)
return false;
else if ((s64)be64_to_cpu(qd->qd_qb.qb_value) >=
(s64)be64_to_cpu(qd->qd_qb.qb_limit))