Skip to content

Commit

Permalink
[PATCH] Remove incorrect unlock_kernel from allocation failure path i…
Browse files Browse the repository at this point in the history
…n coda_open()

Commit 398c53a757702e1e3a7a2c24860c7ad26acb53ed (in the historical GIT
tree) moved the lock_kernel() in coda_open after the allocation of a
coda_file_info struct, but left an unlock_kernel() in the allocation
failure error path; remove it.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Acked-by: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Josh Triplett authored and Linus Torvalds committed Jul 31, 2006
1 parent 3ae1920 commit 6ecbc4e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/coda/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,8 @@ int coda_open(struct inode *coda_inode, struct file *coda_file)
coda_vfs_stat.open++;

cfi = kmalloc(sizeof(struct coda_file_info), GFP_KERNEL);
if (!cfi) {
unlock_kernel();
if (!cfi)
return -ENOMEM;
}

lock_kernel();

Expand Down

0 comments on commit 6ecbc4e

Please sign in to comment.