summaryrefslogtreecommitdiffstats
path: root/fs/devpts
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-06-11 14:03:55 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-11 08:51:06 -0700
commit93d5581e20600593ec3236921b6620225fb76034 (patch)
treee43e81637542951f2e3d7244e010506605dce2d8 /fs/devpts
parent26a2e20f4a966bebc312836aeb4423fbfd4e33e2 (diff)
downloadlinux-93d5581e20600593ec3236921b6620225fb76034.tar.gz
linux-93d5581e20600593ec3236921b6620225fb76034.tar.bz2
linux-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>
Diffstat (limited to 'fs/devpts')
-rw-r--r--fs/devpts/inode.c4
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;
}