diff options
author | Alan Cox <alan@linux.intel.com> | 2009-06-11 17:03:55 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 19:51:06 +0400 |
commit | 93d5581e20600593ec3236921b6620225fb76034 (patch) | |
tree | e43e81637542951f2e3d7244e010506605dce2d8 /fs/devpts | |
parent | 26a2e20f4a966bebc312836aeb4423fbfd4e33e2 (diff) | |
download | linux-93d5581e20600593ec3236921b6620225fb76034.tar.xz |
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>
Diffstat (limited to 'fs/devpts')
-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; } |