aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@linux.alibaba.com>2024-10-09 11:31:51 +0800
committerChristian Brauner <brauner@kernel.org>2024-10-21 14:30:27 +0200
commit14c2d97265ea5989000c428dbb7321cbd4a85f9b (patch)
treeb0946cf38dee82b83d5b0337bbc163d6302ea113
parentfs/super.c: introduce get_tree_bdev_flags() (diff)
downloadwireguard-linux-14c2d97265ea5989000c428dbb7321cbd4a85f9b.tar.xz
wireguard-linux-14c2d97265ea5989000c428dbb7321cbd4a85f9b.zip
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 <allison.karlitskaya@redhat.com> Closes: https://lore.kernel.org/r/CAOYeF9VQ8jKVmpy5Zy9DNhO6xmWSKMB-DO8yvBB0XvBE7=3Ugg@mail.gmail.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20241009033151.2334888-2-hsiangkao@linux.alibaba.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to '')
-rw-r--r--fs/erofs/super.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index 320d586c3896..bed3dbe5b7cb 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -709,7 +709,9 @@ static int erofs_fc_get_tree(struct fs_context *fc)
if (IS_ENABLED(CONFIG_EROFS_FS_ONDEMAND) && sbi->fsid)
return get_tree_nodev(fc, erofs_fc_fill_super);
- ret = get_tree_bdev(fc, erofs_fc_fill_super);
+ ret = get_tree_bdev_flags(fc, erofs_fc_fill_super,
+ IS_ENABLED(CONFIG_EROFS_FS_BACKED_BY_FILE) ?
+ GET_TREE_BDEV_QUIET_LOOKUP : 0);
#ifdef CONFIG_EROFS_FS_BACKED_BY_FILE
if (ret == -ENOTBLK) {
if (!fc->source)