diff options
author | Alan Cox <alan@linux.intel.com> | 2009-06-11 14:03:55 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 08:51:06 -0700 |
commit | 93d5581e20600593ec3236921b6620225fb76034 (patch) | |
tree | e43e81637542951f2e3d7244e010506605dce2d8 | |
parent | 26a2e20f4a966bebc312836aeb4423fbfd4e33e2 (diff) | |
download | kernel-common-93d5581e20600593ec3236921b6620225fb76034.tar.gz kernel-common-93d5581e20600593ec3236921b6620225fb76034.tar.bz2 kernel-common-93d5581e20600593ec3236921b6620225fb76034.zip |
devpts: unregister the file system on error
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>
-rw-r--r-- | fs/devpts/inode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index c68edb969441..9b1d285f9fe6 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; } |