From 93d5581e20600593ec3236921b6620225fb76034 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 11 Jun 2009 14:03:55 +0100 Subject: devpts: unregister the file system on error Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13429 Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds --- fs/devpts/inode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fs/devpts') diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index c68edb96944..9b1d285f9fe 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -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; } -- cgit v1.2.3