aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-13 15:19:30 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-13 15:19:30 -0400
commit3720bd8b1e16b41b9ec640bf91f12e1a1b5cb961 (patch)
treefecdaa69be5fc1f934909b89a6e3ae2c79241dfe
parenta61caa8523a76e497f6b2a05350c892bc5ee402c (diff)
parent6a8b4d319c52f8a3fdca46b185d001fbf0939911 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6
-rw-r--r--drivers/mtd/chips/Kconfig2
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0020.c5
-rw-r--r--fs/jffs2/build.c9
-rw-r--r--fs/jffs2/nodelist.c14
-rw-r--r--fs/jffs2/os-linux.h4
-rw-r--r--fs/jffs2/readinode.c11
-rw-r--r--fs/jffs2/super.c11
7 files changed, 30 insertions, 26 deletions
diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig
index b5dc59389bb3..df95d2158b16 100644
--- a/drivers/mtd/chips/Kconfig
+++ b/drivers/mtd/chips/Kconfig
@@ -300,7 +300,7 @@ config MTD_JEDEC
300 300
301config MTD_XIP 301config MTD_XIP
302 bool "XIP aware MTD support" 302 bool "XIP aware MTD support"
303 depends on !SMP && (MTD_CFI_INTELEXT || MTD_CFI_AMDSTD) && EXPERIMENTAL 303 depends on !SMP && (MTD_CFI_INTELEXT || MTD_CFI_AMDSTD) && EXPERIMENTAL && ARM
304 default y if XIP_KERNEL 304 default y if XIP_KERNEL
305 help 305 help
306 This allows MTD support to work with flash memory which is also 306 This allows MTD support to work with flash memory which is also
diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
index 8c24e18db3b4..c894f8801578 100644
--- a/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -4,7 +4,7 @@
4 * 4 *
5 * (C) 2000 Red Hat. GPL'd 5 * (C) 2000 Red Hat. GPL'd
6 * 6 *
7 * $Id: cfi_cmdset_0020.c,v 1.17 2004/11/20 12:49:04 dwmw2 Exp $ 7 * $Id: cfi_cmdset_0020.c,v 1.19 2005/07/13 15:52:45 dwmw2 Exp $
8 * 8 *
9 * 10/10/2000 Nicolas Pitre <nico@cam.org> 9 * 10/10/2000 Nicolas Pitre <nico@cam.org>
10 * - completely revamped method functions so they are aware and 10 * - completely revamped method functions so they are aware and
@@ -16,6 +16,8 @@
16 * - modified Intel Command Set 0x0001 to support ST Advanced Architecture 16 * - modified Intel Command Set 0x0001 to support ST Advanced Architecture
17 * (command set 0x0020) 17 * (command set 0x0020)
18 * - added a writev function 18 * - added a writev function
19 * 07/13/2005 Joern Engel <joern@wh.fh-wedel.de>
20 * - Plugged memory leak in cfi_staa_writev().
19 */ 21 */
20 22
21#include <linux/version.h> 23#include <linux/version.h>
@@ -719,6 +721,7 @@ cfi_staa_writev(struct mtd_info *mtd, const struct kvec *vecs,
719write_error: 721write_error:
720 if (retlen) 722 if (retlen)
721 *retlen = totlen; 723 *retlen = totlen;
724 kfree(buffer);
722 return ret; 725 return ret;
723} 726}
724 727
diff --git a/fs/jffs2/build.c b/fs/jffs2/build.c
index 3dd5394921c9..97dc39796e2c 100644
--- a/fs/jffs2/build.c
+++ b/fs/jffs2/build.c
@@ -7,7 +7,7 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in this directory. 8 * For licensing information, see the file 'LICENCE' in this directory.
9 * 9 *
10 * $Id: build.c,v 1.70 2005/02/28 08:21:05 dedekind Exp $ 10 * $Id: build.c,v 1.71 2005/07/12 16:37:08 dedekind Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -336,13 +336,6 @@ int jffs2_do_mount_fs(struct jffs2_sb_info *c)
336 c->blocks[i].bad_count = 0; 336 c->blocks[i].bad_count = 0;
337 } 337 }
338 338
339 init_MUTEX(&c->alloc_sem);
340 init_MUTEX(&c->erase_free_sem);
341 init_waitqueue_head(&c->erase_wait);
342 init_waitqueue_head(&c->inocache_wq);
343 spin_lock_init(&c->erase_completion_lock);
344 spin_lock_init(&c->inocache_lock);
345
346 INIT_LIST_HEAD(&c->clean_list); 339 INIT_LIST_HEAD(&c->clean_list);
347 INIT_LIST_HEAD(&c->very_dirty_list); 340 INIT_LIST_HEAD(&c->very_dirty_list);
348 INIT_LIST_HEAD(&c->dirty_list); 341 INIT_LIST_HEAD(&c->dirty_list);
diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c
index c7bbdeec93a6..4991c348f6ec 100644
--- a/fs/jffs2/nodelist.c
+++ b/fs/jffs2/nodelist.c
@@ -7,7 +7,7 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in this directory. 8 * For licensing information, see the file 'LICENCE' in this directory.
9 * 9 *
10 * $Id: nodelist.c,v 1.97 2005/07/06 15:18:41 dwmw2 Exp $ 10 * $Id: nodelist.c,v 1.98 2005/07/10 15:15:32 dedekind Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -55,11 +55,11 @@ void jffs2_add_fd_to_list(struct jffs2_sb_info *c, struct jffs2_full_dirent *new
55 }); 55 });
56} 56}
57 57
58/* Put a new tmp_dnode_info into the list, keeping the list in 58/*
59 order of increasing version 59 * Put a new tmp_dnode_info into the temporaty RB-tree, keeping the list in
60*/ 60 * order of increasing version.
61 61 */
62static void jffs2_add_tn_to_list(struct jffs2_tmp_dnode_info *tn, struct rb_root *list) 62static void jffs2_add_tn_to_tree(struct jffs2_tmp_dnode_info *tn, struct rb_root *list)
63{ 63{
64 struct rb_node **p = &list->rb_node; 64 struct rb_node **p = &list->rb_node;
65 struct rb_node * parent = NULL; 65 struct rb_node * parent = NULL;
@@ -420,7 +420,7 @@ int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
420 D1(printk(KERN_DEBUG "dnode @%08x: ver %u, offset %04x, dsize %04x\n", 420 D1(printk(KERN_DEBUG "dnode @%08x: ver %u, offset %04x, dsize %04x\n",
421 ref_offset(ref), je32_to_cpu(node.i.version), 421 ref_offset(ref), je32_to_cpu(node.i.version),
422 je32_to_cpu(node.i.offset), je32_to_cpu(node.i.dsize))); 422 je32_to_cpu(node.i.offset), je32_to_cpu(node.i.dsize)));
423 jffs2_add_tn_to_list(tn, &ret_tn); 423 jffs2_add_tn_to_tree(tn, &ret_tn);
424 break; 424 break;
425 425
426 default: 426 default:
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
index 7bf72e012c94..d900c8929b09 100644
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -7,7 +7,7 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in this directory. 8 * For licensing information, see the file 'LICENCE' in this directory.
9 * 9 *
10 * $Id: os-linux.h,v 1.57 2005/07/06 12:13:09 dwmw2 Exp $ 10 * $Id: os-linux.h,v 1.58 2005/07/12 02:34:35 tpoynor Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -86,6 +86,8 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
86#define jffs2_dataflash(c) (0) 86#define jffs2_dataflash(c) (0)
87#define jffs2_nor_ecc_flash_setup(c) (0) 87#define jffs2_nor_ecc_flash_setup(c) (0)
88#define jffs2_nor_ecc_flash_cleanup(c) do {} while (0) 88#define jffs2_nor_ecc_flash_cleanup(c) do {} while (0)
89#define jffs2_dataflash_setup(c) (0)
90#define jffs2_dataflash_cleanup(c) do {} while (0)
89 91
90#else /* NAND and/or ECC'd NOR support present */ 92#else /* NAND and/or ECC'd NOR support present */
91 93
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index 081656c1d49e..5b2a83599d73 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -7,7 +7,7 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in this directory. 8 * For licensing information, see the file 'LICENCE' in this directory.
9 * 9 *
10 * $Id: readinode.c,v 1.120 2005/07/05 21:03:07 dwmw2 Exp $ 10 * $Id: readinode.c,v 1.125 2005/07/10 13:13:55 dedekind Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -151,6 +151,9 @@ int jffs2_add_full_dnode_to_inode(struct jffs2_sb_info *c, struct jffs2_inode_in
151 151
152 D1(printk(KERN_DEBUG "jffs2_add_full_dnode_to_inode(ino #%u, f %p, fn %p)\n", f->inocache->ino, f, fn)); 152 D1(printk(KERN_DEBUG "jffs2_add_full_dnode_to_inode(ino #%u, f %p, fn %p)\n", f->inocache->ino, f, fn));
153 153
154 if (unlikely(!fn->size))
155 return 0;
156
154 newfrag = jffs2_alloc_node_frag(); 157 newfrag = jffs2_alloc_node_frag();
155 if (unlikely(!newfrag)) 158 if (unlikely(!newfrag))
156 return -ENOMEM; 159 return -ENOMEM;
@@ -158,11 +161,6 @@ int jffs2_add_full_dnode_to_inode(struct jffs2_sb_info *c, struct jffs2_inode_in
158 D2(printk(KERN_DEBUG "adding node %04x-%04x @0x%08x on flash, newfrag *%p\n", 161 D2(printk(KERN_DEBUG "adding node %04x-%04x @0x%08x on flash, newfrag *%p\n",
159 fn->ofs, fn->ofs+fn->size, ref_offset(fn->raw), newfrag)); 162 fn->ofs, fn->ofs+fn->size, ref_offset(fn->raw), newfrag));
160 163
161 if (unlikely(!fn->size)) {
162 jffs2_free_node_frag(newfrag);
163 return 0;
164 }
165
166 newfrag->ofs = fn->ofs; 164 newfrag->ofs = fn->ofs;
167 newfrag->size = fn->size; 165 newfrag->size = fn->size;
168 newfrag->node = fn; 166 newfrag->node = fn;
@@ -560,7 +558,6 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
560 } 558 }
561 next_tn: 559 next_tn:
562 BUG_ON(rb->rb_left); 560 BUG_ON(rb->rb_left);
563 repl_rb = NULL;
564 if (rb->rb_parent && rb->rb_parent->rb_left == rb) { 561 if (rb->rb_parent && rb->rb_parent->rb_left == rb) {
565 /* We were then left-hand child of our parent. We need 562 /* We were then left-hand child of our parent. We need
566 to move our own right-hand child into our place. */ 563 to move our own right-hand child into our place. */
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 2cf14cf8b35a..aaf9475cfb6a 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -7,7 +7,7 @@
7 * 7 *
8 * For licensing information, see the file 'LICENCE' in this directory. 8 * For licensing information, see the file 'LICENCE' in this directory.
9 * 9 *
10 * $Id: super.c,v 1.106 2005/05/18 11:37:25 dedekind Exp $ 10 * $Id: super.c,v 1.107 2005/07/12 16:37:08 dedekind Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -140,6 +140,15 @@ static struct super_block *jffs2_get_sb_mtd(struct file_system_type *fs_type,
140 D1(printk(KERN_DEBUG "jffs2_get_sb_mtd(): New superblock for device %d (\"%s\")\n", 140 D1(printk(KERN_DEBUG "jffs2_get_sb_mtd(): New superblock for device %d (\"%s\")\n",
141 mtd->index, mtd->name)); 141 mtd->index, mtd->name));
142 142
143 /* Initialize JFFS2 superblock locks, the further initialization will be
144 * done later */
145 init_MUTEX(&c->alloc_sem);
146 init_MUTEX(&c->erase_free_sem);
147 init_waitqueue_head(&c->erase_wait);
148 init_waitqueue_head(&c->inocache_wq);
149 spin_lock_init(&c->erase_completion_lock);
150 spin_lock_init(&c->inocache_lock);
151
143 sb->s_op = &jffs2_super_operations; 152 sb->s_op = &jffs2_super_operations;
144 sb->s_flags = flags | MS_NOATIME; 153 sb->s_flags = flags | MS_NOATIME;
145 154