Skip to content

Commit 14c2d97

Browse files
hsiangkaobrauner
authored andcommitted
erofs: use get_tree_bdev_flags() to avoid misleading messages
Users can pass in an arbitrary source path for the proper type of a mount then without "Can't lookup blockdev" error message. Reported-by: Allison Karlitskaya <[email protected]> Closes: https://lore.kernel.org/r/CAOYeF9VQ8jKVmpy5Zy9DNhO6xmWSKMB-DO8yvBB0XvBE7=3Ugg@mail.gmail.com Signed-off-by: Gao Xiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent 4021e68 commit 14c2d97

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/erofs/super.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,9 @@ static int erofs_fc_get_tree(struct fs_context *fc)
709709
if (IS_ENABLED(CONFIG_EROFS_FS_ONDEMAND) && sbi->fsid)
710710
return get_tree_nodev(fc, erofs_fc_fill_super);
711711

712-
ret = get_tree_bdev(fc, erofs_fc_fill_super);
712+
ret = get_tree_bdev_flags(fc, erofs_fc_fill_super,
713+
IS_ENABLED(CONFIG_EROFS_FS_BACKED_BY_FILE) ?
714+
GET_TREE_BDEV_QUIET_LOOKUP : 0);
713715
#ifdef CONFIG_EROFS_FS_BACKED_BY_FILE
714716
if (ret == -ENOTBLK) {
715717
if (!fc->source)

0 commit comments

Comments
 (0)