]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: fix incorrect extent state in xfs_bmap_add_extent_unwritten_real
authorChristoph Hellwig <hch@lst.de>
Fri, 17 Nov 2017 04:08:59 +0000 (22:08 -0600)
committerEric Sandeen <sandeen@redhat.com>
Fri, 17 Nov 2017 04:08:59 +0000 (22:08 -0600)
commit0fcf37796975f329296336d12d5783dc47c74cce
tree07813421a996fe2d7691fa60f4913d3d1f330059
parent43ba1d61e0e5f493e529fd9db20dc8a6ee6d5899
xfs: fix incorrect extent state in xfs_bmap_add_extent_unwritten_real

Source kernel commit: 5e422f5e4fd71d18bc6b851eeb3864477b3d842e

There was one spot in xfs_bmap_add_extent_unwritten_real that didn't use the
passed in new extent state but always converted to normal, leading to wrong
behavior when converting from normal to unwritten.

Only found by code inspection, it seems like this code path to move partial
extent from written to unwritten while merging it with the next extent is
rarely exercised.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
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