]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:20:27 +0000 (08:20 +0200)
commit2a2abe885a29d7133a4bf6ad6e84e80031ecd7ca
tree46dd594f1115143ecc1fd7c6318326c0d4d9bd1a
parente227de882e47a2c23dc3b13d93ab4289cd29e179
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/libxfs/xfs_sb.c