]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: don't allow bmap on rt files
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 19 Jun 2017 20:19:08 +0000 (13:19 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 20 Jun 2017 17:45:22 +0000 (10:45 -0700)
commit56f393c31e52844309db229021f45878b901f31e
treef4ca9403fcfaadbf121670af744152e64ae06eb3
parent10803b6a5ea0a7a4f58d3d0011460adc05cca631
xfs: don't allow bmap on rt files

bmap returns a dumb LBA address but not the block device that goes with
that LBA.  Swapfiles don't care about this and will blindly assume that
the data volume is the correct blockdev, which is totally bogus for
files on the rt subvolume.  This results in the swap code doing IOs to
arbitrary locations on the data device(!) if the passed in mapping is a
realtime file, so just turn off bmap for rt files.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_aops.c