diff options
author | David Woodhouse <dwmw2@infradead.org> | 2005-02-02 22:12:08 +0000 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-05-23 12:20:43 +0200 |
commit | 8aee6ac1446d6e2cb69908facbaccc0dfb4f1145 (patch) | |
tree | 8e1413d24eb930cb9173e690c8b04b4c370e9eb0 /fs | |
parent | f29a4b86f554a496beba8d339917399b9c44fbc9 (diff) | |
download | op-kernel-dev-8aee6ac1446d6e2cb69908facbaccc0dfb4f1145.zip op-kernel-dev-8aee6ac1446d6e2cb69908facbaccc0dfb4f1145.tar.gz |
[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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jffs2/wbuf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index b43aac7..4346940b4 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c @@ -9,7 +9,7 @@ * * For licensing information, see the file 'LICENCE' in this directory. * - * $Id: wbuf.c,v 1.84 2005/01/25 20:11:11 hammache Exp $ + * $Id: wbuf.c,v 1.85 2005/02/02 22:12:04 dwmw2 Exp $ * */ @@ -534,6 +534,9 @@ int jffs2_flush_wbuf_gc(struct jffs2_sb_info *c, uint32_t ino) D1(printk(KERN_DEBUG "jffs2_flush_wbuf_gc() called for ino #%u...\n", ino)); + if (!c->wbuf) + return 0; + down(&c->alloc_sem); if (!jffs2_wbuf_pending_for_ino(c, ino)) { 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) { int ret; + if (!c->wbuf) + return 0; + down_write(&c->wbuf_sem); ret = __jffs2_flush_wbuf(c, PAD_NOACCOUNT); /* retry - maybe wbuf recover left some data in wbuf. */ |