Patch "gfs2: Revert "ignore negated quota changes"" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    gfs2: Revert "ignore negated quota changes"

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     gfs2-revert-ignore-negated-quota-changes.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit bbbbcf4d6c3e83794cd4ccdee17439d801114d59
Author: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
Date:   Mon Jun 3 19:04:09 2024 +0200

    gfs2: Revert "ignore negated quota changes"
    
    [ Upstream commit 4b4b6374dc6134849f2bdca81fa2945b6ed6d9fc ]
    
    Commit 4c6a08125f22 ("gfs2: ignore negated quota changes") skips quota
    changes with qd_change == 0 instead of writing them back, which leaves
    behind non-zero qd_change values in the affected slots.  The kernel then
    assumes that those slots are unused, while the qd_change values on disk
    indicate that they are indeed still in use.  The next time the
    filesystem is mounted, those invalid slots are read in from disk, which
    will cause inconsistencies.
    
    Revert that commit to avoid filesystem corruption.
    
    This reverts commit 4c6a08125f2249531ec01783a5f4317d7342add5.
    
    Signed-off-by: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index ed602352fe1d3..c537e1d02cf3a 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -454,17 +454,6 @@ static bool qd_grab_sync(struct gfs2_sbd *sdp, struct gfs2_quota_data *qd,
 	    qd->qd_sync_gen >= sync_gen)
 		return false;
 
-	/*
-	 * If qd_change is 0 it means a pending quota change was negated.
-	 * We should not sync it, but we still have a qd reference and slot
-	 * reference taken by gfs2_quota_change -> do_qc that need to be put.
-	 */
-	if (!qd->qd_change && test_and_clear_bit(QDF_CHANGE, &qd->qd_flags)) {
-		slot_put(qd);
-		qd_put(qd);
-		return false;
-	}
-
 	if (!lockref_get_not_dead(&qd->qd_lockref))
 		return false;
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux