[fix] get rid of checking for absent device name in vfs_get_tree() [Linux 5.1]

[fix] get rid of checking for absent device name in vfs_get_tree() [Linux 5.1]

This Linux kernel change "[fix] get rid of checking for absent device name in vfs_get_tree()" is included in the Linux 5.1 release. This change is authored by Al Viro <viro [at] zeniv.linux.org.uk> on Sun Apr 28 21:34:21 2019 -0400. The commit for this change in Linux stable tree is ee94883 (patch).

[fix] get rid of checking for absent device name in vfs_get_tree()

It has no business being there, it's checked by relevant ->get_tree()
as it is *and* it returns the wrong error for no reason whatsoever.

Fixes: f3a09c92018a "introduce fs_context methods"
Signed-off-by: Al Viro <[email protected]>

There are 5 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 fs/super.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/fs/super.c b/fs/super.c
index 583a012..2739f575 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1467,11 +1467,6 @@ int vfs_get_tree(struct fs_context *fc)
    struct super_block *sb;
    int error;

-   if (fc->fs_type->fs_flags & FS_REQUIRES_DEV && !fc->source) {
-       errorf(fc, "Filesystem requires source device");
-       return -ENOENT;
-   }
-
    if (fc->root)
        return -EBUSY;

Leave a Reply

Your email address will not be published. Required fields are marked *