]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - libxfs/xfs_bmap.c
xfs: don't free rt blocks when we're doing a REMAP bunmapi call
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 12 Nov 2020 22:19:52 +0000 (17:19 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 12 Nov 2020 22:19:52 +0000 (17:19 -0500)
commitd5fe08a68a17e143333c9eb959f948b58ded2802
treef42e69593bbcdc8e5213c6a94bc234d5c85fd8ef
parent24b24fade88e82bd14aafed10b238049ca220cd4
xfs: don't free rt blocks when we're doing a REMAP bunmapi call

Source kernel commit: 8df0fa39bdd86ca81a8d706a6ed9d33cc65ca625

When callers pass XFS_BMAPI_REMAP into xfs_bunmapi, they want the extent
to be unmapped from the given file fork without the extent being freed.
We do this for non-rt files, but we forgot to do this for realtime
files.  So far this isn't a big deal since nobody makes a bunmapi call
to a rt file with the REMAP flag set, but don't leave a logic bomb.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c