problems with JFFS2 assert failure on mutex
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?
Signature · 2 lines
Øyvind Harboe http://www.zylin.com
Index: gc.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/fs/jffs2/current/src/gc.c,v retrieving revision 1.7
gc.c +4 -4
@@ -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);
Quoted 4 lines · Øyvind Harboe
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.
Looks correct; I've committed an equivalent to CVS. Thanks.
Quoted 1 line
Comments?
Only that this error path should never happen. The call to jffs2_gc_fetch_inode() for a valid inode should _never_ fail.
Signature · 1 line
dwmw2
tir, 20.07.2004 kl. 15.41 skrev David Woodhouse:
Quoted 12 lines · Øyvind Harboe
Quoted 4 lines
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.
Looks correct; I've committed an equivalent to CVS. Thanks.
Quoted 1 line
Comments?
Only that this error path should never happen. The call to
jffs2_gc_fetch_inode()for a valid inode should _never_ fail.
I believe this was with a corrupt JFFS2 disk.
Signature · 2 lines
Øyvind Harboe http://www.zylin.com