aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2005-02-02 17:12:08 -0500
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-05-23 06:20:43 -0400
commit8aee6ac1446d6e2cb69908facbaccc0dfb4f1145 (patch)
tree8e1413d24eb930cb9173e690c8b04b4c370e9eb0
parentf29a4b86f554a496beba8d339917399b9c44fbc9 (diff)
[JFFS2] Remove NAND dependencies for NOR FLASH
make NAND code work on NOR flash again Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--fs/jffs2/wbuf.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index b43aac7496ae..4346940b4871 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -9,7 +9,7 @@
9 * 9 *
10 * For licensing information, see the file 'LICENCE' in this directory. 10 * For licensing information, see the file 'LICENCE' in this directory.
11 * 11 *
12 * $Id: wbuf.c,v 1.84 2005/01/25 20:11:11 hammache Exp $ 12 * $Id: wbuf.c,v 1.85 2005/02/02 22:12:04 dwmw2 Exp $
13 * 13 *
14 */ 14 */
15 15
@@ -534,6 +534,9 @@ int jffs2_flush_wbuf_gc(struct jffs2_sb_info *c, uint32_t ino)
534 534
535 D1(printk(KERN_DEBUG "jffs2_flush_wbuf_gc() called for ino #%u...\n", ino)); 535 D1(printk(KERN_DEBUG "jffs2_flush_wbuf_gc() called for ino #%u...\n", ino));
536 536
537 if (!c->wbuf)
538 return 0;
539
537 down(&c->alloc_sem); 540 down(&c->alloc_sem);
538 if (!jffs2_wbuf_pending_for_ino(c, ino)) { 541 if (!jffs2_wbuf_pending_for_ino(c, ino)) {
539 D1(printk(KERN_DEBUG "Ino #%d not pending in wbuf. Returning\n", ino)); 542 D1(printk(KERN_DEBUG "Ino #%d not pending in wbuf. Returning\n", ino));
@@ -588,6 +591,9 @@ int jffs2_flush_wbuf_pad(struct jffs2_sb_info *c)
588{ 591{
589 int ret; 592 int ret;
590 593
594 if (!c->wbuf)
595 return 0;
596
591 down_write(&c->wbuf_sem); 597 down_write(&c->wbuf_sem);
592 ret = __jffs2_flush_wbuf(c, PAD_NOACCOUNT); 598 ret = __jffs2_flush_wbuf(c, PAD_NOACCOUNT);
593 /* retry - maybe wbuf recover left some data in wbuf. */ 599 /* retry - maybe wbuf recover left some data in wbuf. */