diff options
Diffstat (limited to 'fs/jffs2/wbuf.c')
-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 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. */ |