diff options
author | Josh Triplett <josht@us.ibm.com> | 2006-07-30 06:03:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-31 16:28:42 -0400 |
commit | 344fe78669d2d1cff9e8939598f6d0d865b6a75b (patch) | |
tree | 1b5dc1e8edd1e67ab4d87ed05e43bea527129b91 /fs/ufs | |
parent | 0bee8d28496a8c76b488a2c29e01a0ebc1411475 (diff) |
[PATCH] ufs: remove incorrect unlock_kernel from failure path in ufs_symlink()
ufs_symlink, in one of its error paths, calls unlock_kernel without ever
having called lock_kernel(); fix this by creating and jumping to a new
label out_notlocked rather than the out label used after calling
lock_kernel().
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ufs')
-rw-r--r-- | fs/ufs/namei.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c index abd5f23a426d..d344b411e261 100644 --- a/fs/ufs/namei.c +++ b/fs/ufs/namei.c | |||
@@ -129,7 +129,7 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry, | |||
129 | struct inode * inode; | 129 | struct inode * inode; |
130 | 130 | ||
131 | if (l > sb->s_blocksize) | 131 | if (l > sb->s_blocksize) |
132 | goto out; | 132 | goto out_notlocked; |
133 | 133 | ||
134 | lock_kernel(); | 134 | lock_kernel(); |
135 | inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO); | 135 | inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO); |
@@ -155,6 +155,7 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry, | |||
155 | err = ufs_add_nondir(dentry, inode); | 155 | err = ufs_add_nondir(dentry, inode); |
156 | out: | 156 | out: |
157 | unlock_kernel(); | 157 | unlock_kernel(); |
158 | out_notlocked: | ||
158 | return err; | 159 | return err; |
159 | 160 | ||
160 | out_fail: | 161 | out_fail: |