mirror of
https://github.com/torvalds/linux
synced 2024-10-03 18:00:50 +00:00
gfs2: Revert "ignore negated quota changes"
Commit4c6a08125f
("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 commit4c6a08125f
. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
59ebc33201
commit
4b4b6374dc
|
@ -470,17 +470,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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue