]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/xfs/xfs_aops.c
xfs: don't allow bmap on rt files
[karo-tx-linux.git] / fs / xfs / xfs_aops.c
index 6bab8c449b8148add9ef644d00bf3977a930bac9..716b5eeeed945b64da4ad93cbcd9ba9c1a50719e 100644 (file)
@@ -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);