Skip to content

Commit 9f494e9

Browse files
AstralBobAndreas Gruenbacher
authored andcommitted
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 <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent 2a4f651 commit 9f494e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/gfs2/quota.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ static bool need_sync(struct gfs2_quota_data *qd)
11261126
den = gt->gt_quota_scale_den;
11271127
spin_unlock(&gt->gt_spin);
11281128

1129-
if (value < 0)
1129+
if (value <= 0)
11301130
return false;
11311131
else if ((s64)be64_to_cpu(qd->qd_qb.qb_value) >=
11321132
(s64)be64_to_cpu(qd->qd_qb.qb_limit))

0 commit comments

Comments
 (0)