aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/fs.c')
-rw-r--r--fs/jffs2/fs.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index a0f84673ce54..7b6c24b14f85 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -37,7 +37,7 @@ static int jffs2_do_setattr (struct inode *inode, struct iattr *iattr)
37 unsigned char *mdata = NULL; 37 unsigned char *mdata = NULL;
38 int mdatalen = 0; 38 int mdatalen = 0;
39 unsigned int ivalid; 39 unsigned int ivalid;
40 uint32_t phys_ofs, alloclen; 40 uint32_t alloclen;
41 int ret; 41 int ret;
42 D1(printk(KERN_DEBUG "jffs2_setattr(): ino #%lu\n", inode->i_ino)); 42 D1(printk(KERN_DEBUG "jffs2_setattr(): ino #%lu\n", inode->i_ino));
43 ret = inode_change_ok(inode, iattr); 43 ret = inode_change_ok(inode, iattr);
@@ -79,8 +79,8 @@ static int jffs2_do_setattr (struct inode *inode, struct iattr *iattr)
79 return -ENOMEM; 79 return -ENOMEM;
80 } 80 }
81 81
82 ret = jffs2_reserve_space(c, sizeof(*ri) + mdatalen, &phys_ofs, &alloclen, 82 ret = jffs2_reserve_space(c, sizeof(*ri) + mdatalen, &alloclen,
83 ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE); 83 ALLOC_NORMAL, JFFS2_SUMMARY_INODE_SIZE);
84 if (ret) { 84 if (ret) {
85 jffs2_free_raw_inode(ri); 85 jffs2_free_raw_inode(ri);
86 if (S_ISLNK(inode->i_mode & S_IFMT)) 86 if (S_ISLNK(inode->i_mode & S_IFMT))
@@ -131,7 +131,7 @@ static int jffs2_do_setattr (struct inode *inode, struct iattr *iattr)
131 else 131 else
132 ri->data_crc = cpu_to_je32(0); 132 ri->data_crc = cpu_to_je32(0);
133 133
134 new_metadata = jffs2_write_dnode(c, f, ri, mdata, mdatalen, phys_ofs, ALLOC_NORMAL); 134 new_metadata = jffs2_write_dnode(c, f, ri, mdata, mdatalen, ALLOC_NORMAL);
135 if (S_ISLNK(inode->i_mode)) 135 if (S_ISLNK(inode->i_mode))
136 kfree(mdata); 136 kfree(mdata);
137 137
@@ -664,13 +664,6 @@ static int jffs2_flash_setup(struct jffs2_sb_info *c) {
664 return ret; 664 return ret;
665 } 665 }
666 666
667 /* add setups for other bizarre flashes here... */
668 if (jffs2_nor_ecc(c)) {
669 ret = jffs2_nor_ecc_flash_setup(c);
670 if (ret)
671 return ret;
672 }
673
674 /* and Dataflash */ 667 /* and Dataflash */
675 if (jffs2_dataflash(c)) { 668 if (jffs2_dataflash(c)) {
676 ret = jffs2_dataflash_setup(c); 669 ret = jffs2_dataflash_setup(c);
@@ -694,11 +687,6 @@ void jffs2_flash_cleanup(struct jffs2_sb_info *c) {
694 jffs2_nand_flash_cleanup(c); 687 jffs2_nand_flash_cleanup(c);
695 } 688 }
696 689
697 /* add cleanups for other bizarre flashes here... */
698 if (jffs2_nor_ecc(c)) {
699 jffs2_nor_ecc_flash_cleanup(c);
700 }
701
702 /* and DataFlash */ 690 /* and DataFlash */
703 if (jffs2_dataflash(c)) { 691 if (jffs2_dataflash(c)) {
704 jffs2_dataflash_cleanup(c); 692 jffs2_dataflash_cleanup(c);