mirror of
https://github.com/torvalds/linux.git
synced 2024-10-30 08:42:47 +00:00
xfs: fix superblock inprogress check
From inspection, the superblock sb_inprogress check is done in the verifier and triggered only for the primary superblock via a "bp->b_bn == XFS_SB_DADDR" check. Unfortunately, the primary superblock is an uncached buffer, and hence it is configured by xfs_buf_read_uncached() with: bp->b_bn = XFS_BUF_DADDR_NULL; /* always null for uncached buffers */ And so this check never triggers. Fix it. cc: <stable@vger.kernel.org> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
parent
5b5c2dbd3c
commit
f3d7ebdeb2
@ -583,7 +583,8 @@ xfs_sb_verify(
|
||||
* Only check the in progress field for the primary superblock as
|
||||
* mkfs.xfs doesn't clear it from secondary superblocks.
|
||||
*/
|
||||
return xfs_mount_validate_sb(mp, &sb, bp->b_bn == XFS_SB_DADDR,
|
||||
return xfs_mount_validate_sb(mp, &sb,
|
||||
bp->b_maps[0].bm_bn == XFS_SB_DADDR,
|
||||
check_version);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user