summaryrefslogtreecommitdiffstats
path: root/fs/ufs
diff options
context:
space:
mode:
authorJosh Triplett <josht@us.ibm.com>2006-07-30 03:03:59 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-31 13:28:42 -0700
commit344fe78669d2d1cff9e8939598f6d0d865b6a75b (patch)
tree1b5dc1e8edd1e67ab4d87ed05e43bea527129b91 /fs/ufs
parent0bee8d28496a8c76b488a2c29e01a0ebc1411475 (diff)
downloadlinux-344fe78669d2d1cff9e8939598f6d0d865b6a75b.tar.gz
linux-344fe78669d2d1cff9e8939598f6d0d865b6a75b.tar.bz2
linux-344fe78669d2d1cff9e8939598f6d0d865b6a75b.zip
[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.c3
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,
struct inode * inode;
if (l > sb->s_blocksize)
- goto out;
+ goto out_notlocked;
lock_kernel();
inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO);
@@ -155,6 +155,7 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry,
err = ufs_add_nondir(dentry, inode);
out:
unlock_kernel();
+out_notlocked:
return err;
out_fail: