]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: fix superblock inprogress check
authorDave Chinner <dchinner@redhat.com>
Fri, 26 Aug 2016 06:01:30 +0000 (16:01 +1000)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Feb 2017 10:03:25 +0000 (11:03 +0100)
commit5a8afb1c37c93b4f41f8233bd54e23e7134a2a2d
tree0973de813a21fbd9c9edd6b33b1762b2edb67522
parentee89427388b9ffde431d0331a157620f95b7dd2b
xfs: fix superblock inprogress check

commit f3d7ebdeb2c297bd26272384e955033493ca291c upstream.

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.

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>
[wt: s/xfs_sb.c/xfs_mount.c in 3.10]

Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/xfs/xfs_mount.c