mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 15:40:03 +02:00
xfs: compute dquot checksum after resetting dd_lsn in repair
LOLLM complains that xrep_quota_block updates dd_lsn after calculating
the crc of the ondisk dquot. That's clearly broken, so fix that.
Cc: stable@vger.kernel.org # v6.8
Fixes: a5b9155540 ("xfs: repair quotas")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Assisted-by: LOLLM # finding obvious bugs
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
0fc67528f5
commit
de20f70149
|
|
@ -363,11 +363,18 @@ xrep_quota_block(
|
|||
ddq->d_rtbcount, &ddq->d_rtbtimer,
|
||||
defq->rtb.time);
|
||||
|
||||
/*
|
||||
* This transaction operates on raw disk buffers, so we don't
|
||||
* have a dquot log item to assign the LSN for us. Instead,
|
||||
* set it to zero so that log recovery will always replay any
|
||||
* logged dquot item atop this buffer.
|
||||
*/
|
||||
dqblk->dd_lsn = 0;
|
||||
|
||||
/* We only support v5 filesystems so always set these. */
|
||||
uuid_copy(&dqblk->dd_uuid, &sc->mp->m_sb.sb_meta_uuid);
|
||||
xfs_update_cksum((char *)dqblk, sizeof(struct xfs_dqblk),
|
||||
XFS_DQUOT_CRC_OFF);
|
||||
dqblk->dd_lsn = 0;
|
||||
}
|
||||
switch (dqtype) {
|
||||
case XFS_DQTYPE_USER:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user