public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* problems with JFFS2 assert failure on mutex
@ 2004-07-19 15:17 Øyvind Harboe
  2004-07-20 13:41 ` David Woodhouse
  0 siblings, 1 reply; 3+ messages in thread
From: Øyvind Harboe @ 2004-07-19 15:17 UTC (permalink / raw)
  To: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

I was working on a different problem when I came across a mutex that
was being obtained twice(discovered via eCos asserts).

On the surface of it, this patch looks correct.

Comments?


-- 
Øyvind Harboe
http://www.zylin.com


[-- Attachment #2: mutex.txt --]
[-- Type: text/x-patch, Size: 546 bytes --]

Index: gc.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/fs/jffs2/current/src/gc.c,v
retrieving revision 1.7
diff -w -u -r1.7 gc.c
--- gc.c	1 Apr 2004 03:17:57 -0000	1.7
+++ gc.c	19 Jul 2004 12:54:18 -0000
@@ -358,10 +358,10 @@
 	spin_unlock(&c->inocache_lock);
 
 	f = jffs2_gc_fetch_inode(c, inum, nlink);
-	if (IS_ERR(f))
-		return PTR_ERR(f);
-	if (!f)
-		return 0;
+	if (!f||IS_ERR(f)) {
+	  up(&c->alloc_sem);
+		return f;
+	}
 
 	ret = jffs2_garbage_collect_live(c, jeb, raw, f);
 

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

end of thread, other threads:[~2004-07-20 15:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-19 15:17 problems with JFFS2 assert failure on mutex Øyvind Harboe
2004-07-20 13:41 ` David Woodhouse
2004-07-20 15:27   ` Øyvind Harboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox