linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [coda] Remove incorrect unlock_kernel from allocation failure path in coda_open
@ 2006-07-24 21:23 Josh Triplett
  2006-07-25  0:08 ` Jan Harkes
  0 siblings, 1 reply; 2+ messages in thread
From: Josh Triplett @ 2006-07-24 21:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Jan Harkes, coda, codalist

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>
---
 fs/coda/file.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/fs/coda/file.c b/fs/coda/file.c
index cc66c68..dbfbcfa 100644
--- a/fs/coda/file.c
+++ b/fs/coda/file.c
@@ -136,10 +136,8 @@ int coda_open(struct inode *coda_inode, 
 	coda_vfs_stat.open++;
 
 	cfi = kmalloc(sizeof(struct coda_file_info), GFP_KERNEL);
-	if (!cfi) {
-		unlock_kernel();
+	if (!cfi)
 		return -ENOMEM;
-	}
 
 	lock_kernel();
 



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [coda] Remove incorrect unlock_kernel from allocation failure path in coda_open
  2006-07-24 21:23 [PATCH] [coda] Remove incorrect unlock_kernel from allocation failure path in coda_open Josh Triplett
@ 2006-07-25  0:08 ` Jan Harkes
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Harkes @ 2006-07-25  0:08 UTC (permalink / raw)
  To: Josh Triplett; +Cc: linux-kernel, Andrew Morton

On Mon, Jul 24, 2006 at 07:29:24PM -0400, Josh Triplett wrote:
> 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>

---

Totally correct fix, I actually thought I already sent a patch for the
same problem upstream. I should dig through my local trees to check if
anything else fell through the cracks.

Jan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-25  0:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-24 21:23 [PATCH] [coda] Remove incorrect unlock_kernel from allocation failure path in coda_open Josh Triplett
2006-07-25  0:08 ` Jan Harkes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).