diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-06-23 12:23:06 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-06-23 12:23:06 -0700 |
commit | 7b249bdc3dec656b87bc569d4adcccbfbd525ec1 (patch) | |
tree | e878a3dda7cac323a991c15bfc3986cb4dc24427 | |
parent | a38371cba67539ce6a5d5324db34bc2ddaf66cc1 (diff) | |
parent | eb5e248d502bec191bd99f04cae8b49992b3abde (diff) | |
download | linux-7b249bdc3dec656b87bc569d4adcccbfbd525ec1.tar.gz linux-7b249bdc3dec656b87bc569d4adcccbfbd525ec1.tar.bz2 linux-7b249bdc3dec656b87bc569d4adcccbfbd525ec1.zip |
Merge tag 'xfs-4.12-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull xfs fixes from Darrick Wong:
"I have one more bugfix for you for 4.12-rc7 to fix a disk corruption
problem:
- don't allow swapon on files on the realtime device, because the
swap code will swap pages out to blocks on the data device, thereby
corrupting the filesystem"
* tag 'xfs-4.12-fixes-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
xfs: don't allow bmap on rt files
-rw-r--r-- | fs/xfs/xfs_aops.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 09af0f7cd55e..3b91faacc1ba 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -1316,9 +1316,12 @@ xfs_vm_bmap( * The swap code (ab-)uses ->bmap to get a block mapping and then * bypasseѕ the file system for actual I/O. We really can't allow * that on reflinks inodes, so we have to skip out here. And yes, - * 0 is the magic code for a bmap error.. + * 0 is the magic code for a bmap error. + * + * Since we don't pass back blockdev info, we can't return bmap + * information for rt files either. */ - if (xfs_is_reflink_inode(ip)) + if (xfs_is_reflink_inode(ip) || XFS_IS_REALTIME_INODE(ip)) return 0; filemap_write_and_wait(mapping); |