diff options
author | Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> | 2009-01-29 03:57:12 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-03-27 21:43:59 +0300 |
commit | a9f184f02aa49d46c4c35311d93cbcd1c61149df (patch) | |
tree | 0a2f44b6be19fa876c7b423a1d1f02059952f926 /fs/devpts/inode.c | |
parent | af5df56688acfb75c1b15b4e000ec5e82a9cdc29 (diff) | |
download | linux-a9f184f02aa49d46c4c35311d93cbcd1c61149df.tar.xz |
devpts: Must release s_umount on error
We should drop the ->s_umount mutex if an error occurs after the
sget()/grab_super() call. This was introduced when adding support
for multiple instances of devpts and noticed during a code review/reorg.
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/devpts/inode.c')
-rw-r--r-- | fs/devpts/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index bff4052b05e7..140b43144cd8 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -385,6 +385,7 @@ static int new_pts_mount(struct file_system_type *fs_type, int flags, fail: dput(mnt->mnt_sb->s_root); + up_write(&mnt->mnt_sb->s_umount); deactivate_super(mnt->mnt_sb); return err; } @@ -473,6 +474,7 @@ static int init_pts_mount(struct file_system_type *fs_type, int flags, err = mknod_ptmx(mnt->mnt_sb); if (err) { dput(mnt->mnt_sb->s_root); + up_write(&mnt->mnt_sb->s_umount); deactivate_super(mnt->mnt_sb); } |