]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
xfs: don't free rt blocks when we're doing a REMAP bunmapi call
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 21 Sep 2020 16:15:08 +0000 (09:15 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 10 Dec 2020 11:02:53 +0000 (12:02 +0100)
commitebca1a177676466cf81315374296db6e9e20f370
tree21cba7a891d38de7468b8e4d438dbcb96ac5ceea
parentf4f47a1277c54b036ab684efce7de698365bed3b
xfs: don't free rt blocks when we're doing a REMAP bunmapi call

BugLink: https://bugs.launchpad.net/bugs/1904450
[ Upstream 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: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: William Breathitt Gray <william.gray@canonical.com>
fs/xfs/libxfs/xfs_bmap.c