History

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

Linus Torvalds committed 9 years ago

Commit 7b249bd2 parents a38371c eb5e2481 file · +5 −2Browse files

Unified · Split

fs/xfs/xfs_aops.c+5−2
@@ -1316,9 +1316,12 @@ xfs_vm_bmap( · 1315 unmodified lines
1316 * The swap code (ab-)uses ->bmap to get a block mapping and then1316 * The swap code (ab-)uses ->bmap to get a block mapping and then
1317 * bypasseѕ the file system for actual I/O. We really can't allow1317 * bypasseѕ the file system for actual I/O. We really can't allow
1318 * that on reflinks inodes, so we have to skip out here. And yes,1318 * that on reflinks inodes, so we have to skip out here. And yes,
1319 * 0 is the magic code for a bmap error..1319 * 0 is the magic code for a bmap error.
1320 *
1321 * Since we don't pass back blockdev info, we can't return bmap
1322 * information for rt files either.
1320 */1323 */
1321 if (xfs_is_reflink_inode(ip))1324 if (xfs_is_reflink_inode(ip) || XFS_IS_REALTIME_INODE(ip))
1322 return 0;1325 return 0;
1323 1326
1324 filemap_write_and_wait(mapping);1327 filemap_write_and_wait(mapping);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t