mnt: If fs_fully_visible fails call put_filesystem.
[deliverable/linux.git] / fs / namespace.c
index 4fb1691b435552c044134b56aa2032da35684b5b..9d45c8a3414f7682e421db6de39c4b55c3b85e9a 100644 (file)
@@ -2409,8 +2409,10 @@ static int do_new_mount(struct path *path, const char *fstype, int flags,
                        mnt_flags |= MNT_NODEV | MNT_LOCK_NODEV;
                }
                if (type->fs_flags & FS_USERNS_VISIBLE) {
-                       if (!fs_fully_visible(type, &mnt_flags))
+                       if (!fs_fully_visible(type, &mnt_flags)) {
+                               put_filesystem(type);
                                return -EPERM;
+                       }
                }
        }
 
This page took 0.02359 seconds and 5 git commands to generate.