All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <gleixner@autronix.de>
To: Adam Wozniak <adam.wozniak@comdev.cc>
Cc: David Woodhouse <dwmw2@infradead.org>,
	linux-mtd@lists.infradead.org, jffs-dev@axis.com
Subject: Re: JFFS2 list_dirty corruption
Date: Thu, 21 Feb 2002 01:26:34 +0100	[thread overview]
Message-ID: <0202210126340B.18560@thomas> (raw)
In-Reply-To: <3C74383D.EC664E52@comdev.cc>

On Thursday, 21. February 2002 00:58, Adam Wozniak wrote:
> Ok, maybe this is a problem:
>
Sorry, you're right. I should send such mails better in the morning.
It happened on the transcript from my NAND modified stuff.
Here is the correct patch:

--- mtd/fs/jffs2/scan.c	2002/01/09 13:25:58	1.57
+++ mtd/fs/jffs2/scan.c	2002/02/21 00:17:19
@@ -127,10 +127,17 @@
                         if (jeb->free_size > 2*sizeof(struct 
jffs2_raw_inode) &&
                                 (!c->nextblock || c->nextblock->free_size < 
jeb->free_size)) {
                                 /* Better candidate for the next writes to 
go to */
-                                if (c->nextblock)
+                                if (c->nextblock) {
+					/* We must delete, because mark_node_obsolete
+					   could have added this block to dirty_list already */
+                                        list_del(&c->nextblock->list);
                                         list_add(&c->nextblock->list, 
&c->dirty_list);
+				}
                                 c->nextblock = jeb;
                         } else {
+				/* We must delete, because mark_node_obsolete
+				   could have added this block to dirty_list already */
+				list_del(&jeb->list);
                                 list_add(&jeb->list, &c->dirty_list);
                         }
 		} else {
-- 
Thomas
P.S. David: The jffs2-nand-version is correct.
__________________________________________________
Thomas Gleixner, autronix automation GmbH
auf dem berg 3, d-88690 uhldingen-muehlhofen
fon: +49 7556 919891 , fax: +49 7556 919886
mail: gleixner@autronix.de, http://www.autronix.de  

  reply	other threads:[~2002-02-21  0:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-20 19:41 JFFS2 list_dirty corruption Thomas Gleixner
2002-02-20 20:10 ` Thomas Gleixner
2002-02-20 23:55   ` Adam Wozniak
2002-02-20 23:58   ` Adam Wozniak
2002-02-21  0:26     ` Thomas Gleixner [this message]
2002-02-21  8:59   ` David Woodhouse
2002-02-21  9:19     ` Thomas Gleixner
2002-02-21  9:23       ` David Woodhouse

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=0202210126340B.18560@thomas \
    --to=gleixner@autronix.de \
    --cc=adam.wozniak@comdev.cc \
    --cc=dwmw2@infradead.org \
    --cc=jffs-dev@axis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.