Skip to content

Commit cf5817c

Browse files
author
Jaegeuk Kim
committed
f2fs: don't call block truncation for aliased file
This patch should avoid the below warning which does not corrupt the metadata tho. [ 51.508120][ T253] F2FS-fs (dm-59): access invalid blkaddr:36 [ 51.508156][ T253] __f2fs_is_valid_blkaddr+0x330/0x384 [ 51.508162][ T253] f2fs_is_valid_blkaddr_raw+0x10/0x24 [ 51.508163][ T253] f2fs_truncate_data_blocks_range+0x1ec/0x438 [ 51.508177][ T253] f2fs_remove_inode_page+0x8c/0x148 [ 51.508194][ T253] f2fs_evict_inode+0x230/0x76c Fixes: 128d333 ("f2fs: introduce device aliasing file") Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 91b587b commit cf5817c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/f2fs/node.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,8 +1275,9 @@ int f2fs_remove_inode_page(struct inode *inode)
12751275
}
12761276

12771277
/* remove potential inline_data blocks */
1278-
if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
1279-
S_ISLNK(inode->i_mode))
1278+
if (!IS_DEVICE_ALIASING(inode) &&
1279+
(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
1280+
S_ISLNK(inode->i_mode)))
12801281
f2fs_truncate_data_blocks_range(&dn, 1);
12811282

12821283
/* 0 is possible, after f2fs_new_inode() has failed */

0 commit comments

Comments
 (0)