public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Øyvind Harboe" <oyvind.harboe@zylin.com>
To: linux-mtd@lists.infradead.org
Subject: problems with JFFS2 assert failure on mutex
Date: Mon, 19 Jul 2004 17:17:51 +0200	[thread overview]
Message-ID: <1090250271.14173.6.camel@famine> (raw)

[-- 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);
 

             reply	other threads:[~2004-07-19 15:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-19 15:17 Øyvind Harboe [this message]
2004-07-20 13:41 ` problems with JFFS2 assert failure on mutex David Woodhouse
2004-07-20 15:27   ` Øyvind Harboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1090250271.14173.6.camel@famine \
    --to=oyvind.harboe@zylin.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox