mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 04:45:43 +01:00
erofs: drop unnecessary .read_folio() checks for file-backed mounts
Since currently dedicated EROFS-owned meta inodes are used for
file-backed mounts, .read_folio() checks are now redundant.
As a result, EROFS file-back mounts can now apply to tmpfs too.
Fixes: e587a984d3 ("erofs: use dedicated meta inodes for file-backed mounts")
Signed-off-by: Gao Xiang (Docker) <[email protected]>
This commit is contained in:
1 parent
aafea970fb
commit
209108a545
1 file changed
+2
-4
+2
-4
@@ -851,8 +851,7 @@ static int erofs_fc_get_tree(struct fs_context *fc)
|
||||
errorfc(fc, "source fd option not supported");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!S_ISREG(file_inode(sbi->dif0.file)->i_mode) ||
|
||||
!sbi->dif0.file->f_mapping->a_ops->read_folio) {
|
||||
if (!S_ISREG(file_inode(sbi->dif0.file)->i_mode)) {
|
||||
errorfc(fc, "source is unsupported");
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -872,8 +871,7 @@ static int erofs_fc_get_tree(struct fs_context *fc)
|
||||
return PTR_ERR(file);
|
||||
sbi->dif0.file = file;
|
||||
|
||||
if (S_ISREG(file_inode(sbi->dif0.file)->i_mode) &&
|
||||
sbi->dif0.file->f_mapping->a_ops->read_folio)
|
||||
if (S_ISREG(file_inode(sbi->dif0.file)->i_mode))
|
||||
return erofs_file_get_tree(fc);
|
||||
}
|
||||
return ret;
|
||||
|
||||
Reference in new issue
Block a user