summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2016-08-26 16:01:30 +1000
committerJiri Slaby <jslaby@suse.cz>2016-09-29 11:14:13 +0200
commit09fc5004852c8ec3ae470dfc1f63384e9dd93788 (patch)
tree4b34d6378990ac37ad56e545d59b926a41788cc7
parent94a517e819e083124149fa990e15cb77f3de3293 (diff)
downloadlinux-stable-09fc5004852c8ec3ae470dfc1f63384e9dd93788.tar.gz
linux-stable-09fc5004852c8ec3ae470dfc1f63384e9dd93788.tar.bz2
linux-stable-09fc5004852c8ec3ae470dfc1f63384e9dd93788.zip
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> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r--fs/xfs/xfs_sb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_sb.c b/fs/xfs/xfs_sb.c
index 1351ff0d77ab..44c53ab4add6 100644
--- a/fs/xfs/xfs_sb.c
+++ b/fs/xfs/xfs_sb.c
@@ -602,7 +602,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);
}