]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: set format back to extents if xfs_bmap_extents_to_btree
authorEric Sandeen <sandeen@redhat.com>
Thu, 17 May 2018 17:00:06 +0000 (12:00 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 17 May 2018 17:00:06 +0000 (12:00 -0500)
commit7c4d311d7ed1ebdfa09b33c279e98e10a70575bb
tree67ba71cc5942e775754b211822fba4cd79ccf394
parent3060f26a230ae2c77c2a37071419943978691ba1
xfs: set format back to extents if xfs_bmap_extents_to_btree

Source kernel commit: 2c4306f719b083d17df2963bc761777576b8ad1b

If xfs_bmap_extents_to_btree fails in a mode where we call
xfs_iroot_realloc(-1) to de-allocate the root, set the
format back to extents.

Otherwise we can assume we can dereference ifp->if_broot
based on the XFS_DINODE_FMT_BTREE format, and crash.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199423
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c