aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-19 15:47:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-19 15:47:41 -0500
commitca2a88f56aa385890c7fd4ce9d2722b0848ca990 (patch)
tree935fd9cec938677d6529db203f24d803ed5f0b19 /fs
parent3935e89505a1c3ab3f3b0c7ef0eae54124f48905 (diff)
parentd4d4f1bf6a343b25220fdcdf559fd593dd3e25a7 (diff)
Merge tag 'for-linus-20121219' of git://git.infradead.org/linux-mtd
Pull MTD updates from David Woodhouse: - Various cleanups especially in NAND tests - Add support for NAND flash on BCMA bus - DT support for sh_flctl and denali NAND drivers - Kill obsolete/superceded drivers (fortunet, nomadik_nand) - Fix JFFS2 locking bug in ENOMEM failure path - New SPI flash chips, as usual - Support writing in 'reliable mode' for DiskOnChip G4 - Debugfs support in nandsim * tag 'for-linus-20121219' of git://git.infradead.org/linux-mtd: (96 commits) mtd: nand: typo in nand_id_has_period() comments mtd: nand/gpio: use io{read,write}*_rep accessors mtd: block2mtd: throttle writes by calling balance_dirty_pages_ratelimited. mtd: nand: gpmi: reset BCH earlier, too, to avoid NAND startup problems mtd: nand/docg4: fix and improve read of factory bbt mtd: nand/docg4: reserve bb marker area in ecclayout mtd: nand/docg4: add support for writing in reliable mode mtd: mxc_nand: reorder part_probes to let cmdline override other sources mtd: mxc_nand: fix unbalanced clk_disable() in error path mtd: nandsim: Introduce debugfs infrastructure mtd: physmap_of: error checking to prevent a NULL pointer dereference mtg: docg3: potential divide by zero in doc_write_oob() mtd: bcm47xxnflash: writing support mtd: tests/read: initialize buffer for whole next page mtd: at91: atmel_nand: return bit flips for the PMECC read_page() mtd: fix recovery after failed write-buffer operation in cfi_cmdset_0002.c mtd: nand: onfi need to be probed in 8 bits mode mtd: nand: add NAND_BUSWIDTH_AUTO to autodetect bus width mtd: nand: print flash size during detection mted: nand_wait_ready timeout fix ...
Diffstat (limited to 'fs')
-rw-r--r--fs/jffs2/nodemgmt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
index 0c96eb52c797..03310721712f 100644
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -417,14 +417,16 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
417 spin_unlock(&c->erase_completion_lock); 417 spin_unlock(&c->erase_completion_lock);
418 418
419 ret = jffs2_prealloc_raw_node_refs(c, jeb, 1); 419 ret = jffs2_prealloc_raw_node_refs(c, jeb, 1);
420 if (ret) 420
421 return ret;
422 /* Just lock it again and continue. Nothing much can change because 421 /* Just lock it again and continue. Nothing much can change because
423 we hold c->alloc_sem anyway. In fact, it's not entirely clear why 422 we hold c->alloc_sem anyway. In fact, it's not entirely clear why
424 we hold c->erase_completion_lock in the majority of this function... 423 we hold c->erase_completion_lock in the majority of this function...
425 but that's a question for another (more caffeine-rich) day. */ 424 but that's a question for another (more caffeine-rich) day. */
426 spin_lock(&c->erase_completion_lock); 425 spin_lock(&c->erase_completion_lock);
427 426
427 if (ret)
428 return ret;
429
428 waste = jeb->free_size; 430 waste = jeb->free_size;
429 jffs2_link_node_ref(c, jeb, 431 jffs2_link_node_ref(c, jeb,
430 (jeb->offset + c->sector_size - waste) | REF_OBSOLETE, 432 (jeb->offset + c->sector_size - waste) | REF_OBSOLETE,