[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090324140237.12735.87068.stgit@localhost.localdomain>
Date: Tue, 24 Mar 2009 14:02:40 +0000
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
torvalds@...ux-foundation.org
Subject: [PATCH 06/30] devpts: must release s_umount on error
From: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
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@...ux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Alan Cox <alan@...hedpixels.co.uk>
---
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 bff4052..140b431 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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists