From: Bob Peterson Date: Wed, 30 Aug 2023 12:57:47 +0000 (-0500) Subject: gfs2: Don't try to sync non-changes X-Git-Tag: v6.6.7~1963^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f494e9bdcc54eaed94fcc8fe5d4d5a51c36834c;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Andreas Gruenbacher --- diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index fa1d48d..9be210f 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_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))