]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
devpts: unregister the file system on error
authorAlan Cox <alan@linux.intel.com>
Thu, 11 Jun 2009 13:03:55 +0000 (14:03 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Jun 2009 15:51:06 +0000 (08:51 -0700)
Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13429

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/devpts/inode.c

index c68edb969441c2f199c5b1475ec755ebdbc0fe62..9b1d285f9fe6eb069c9fc62d02beea8df018cffc 100644 (file)
@@ -557,8 +557,10 @@ static int __init init_devpts_fs(void)
        int err = register_filesystem(&devpts_fs_type);
        if (!err) {
                devpts_mnt = kern_mount(&devpts_fs_type);
-               if (IS_ERR(devpts_mnt))
+               if (IS_ERR(devpts_mnt)) {
                        err = PTR_ERR(devpts_mnt);
+                       unregister_filesystem(&devpts_fs_type);
+               }
        }
        return err;
 }