git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
fs
/
jffs2
/
wbuf.c
diff --git
a/fs/jffs2/wbuf.c
b/fs/jffs2/wbuf.c
index
b9b7007
..
9c99859
100644
(file)
--- a/
fs/jffs2/wbuf.c
+++ b/
fs/jffs2/wbuf.c
@@
-19,6
+19,7
@@
#include <linux/crc32.h>
#include <linux/mtd/nand.h>
#include <linux/jiffies.h>
#include <linux/crc32.h>
#include <linux/mtd/nand.h>
#include <linux/jiffies.h>
+#include <linux/sched.h>
#include "nodelist.h"
#include "nodelist.h"
@@
-968,8
+969,7
@@
int jffs2_check_oob_empty(struct jffs2_sb_info *c,
int oobsize = c->mtd->oobsize;
struct mtd_oob_ops ops;
int oobsize = c->mtd->oobsize;
struct mtd_oob_ops ops;
- ops.len = NR_OOB_SCAN_PAGES * oobsize;
- ops.ooblen = oobsize;
+ ops.ooblen = NR_OOB_SCAN_PAGES * oobsize;
ops.oobbuf = c->oobbuf;
ops.ooboffs = 0;
ops.datbuf = NULL;
ops.oobbuf = c->oobbuf;
ops.ooboffs = 0;
ops.datbuf = NULL;
@@
-982,10
+982,10
@@
int jffs2_check_oob_empty(struct jffs2_sb_info *c,
return ret;
}
return ret;
}
- if (ops.
retlen < ops.
len) {
+ if (ops.
oobretlen < ops.oob
len) {
D1(printk(KERN_WARNING "jffs2_check_oob_empty(): Read OOB "
"returned short read (%zd bytes not %d) for block "
D1(printk(KERN_WARNING "jffs2_check_oob_empty(): Read OOB "
"returned short read (%zd bytes not %d) for block "
- "at %08x\n", ops.
retlen, ops.
len, jeb->offset));
+ "at %08x\n", ops.
oobretlen, ops.oob
len, jeb->offset));
return -EIO;
}
return -EIO;
}
@@
-1004,7
+1004,7
@@
int jffs2_check_oob_empty(struct jffs2_sb_info *c,
}
/* we know, we are aligned :) */
}
/* we know, we are aligned :) */
- for (page = oobsize; page < ops.len; page += sizeof(long)) {
+ for (page = oobsize; page < ops.
oob
len; page += sizeof(long)) {
long dat = *(long *)(&ops.oobbuf[page]);
if(dat != -1)
return 1;
long dat = *(long *)(&ops.oobbuf[page]);
if(dat != -1)
return 1;
@@
-1032,7
+1032,6
@@
int jffs2_check_nand_cleanmarker (struct jffs2_sb_info *c,
return 2;
}
return 2;
}
- ops.len = oobsize;
ops.ooblen = oobsize;
ops.oobbuf = c->oobbuf;
ops.ooboffs = 0;
ops.ooblen = oobsize;
ops.oobbuf = c->oobbuf;
ops.ooboffs = 0;
@@
-1047,10
+1046,10
@@
int jffs2_check_nand_cleanmarker (struct jffs2_sb_info *c,
return ret;
}
return ret;
}
- if (ops.
retlen < ops.
len) {
+ if (ops.
oobretlen < ops.oob
len) {
D1 (printk (KERN_WARNING "jffs2_check_nand_cleanmarker(): "
"Read OOB return short read (%zd bytes not %d) "
D1 (printk (KERN_WARNING "jffs2_check_nand_cleanmarker(): "
"Read OOB return short read (%zd bytes not %d) "
- "for block at %08x\n", ops.
retlen, ops.
len,
+ "for block at %08x\n", ops.
oobretlen, ops.oob
len,
jeb->offset));
return -EIO;
}
jeb->offset));
return -EIO;
}
@@
-1089,8
+1088,7
@@
int jffs2_write_nand_cleanmarker(struct jffs2_sb_info *c,
n.nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER);
n.totlen = cpu_to_je32(8);
n.nodetype = cpu_to_je16(JFFS2_NODETYPE_CLEANMARKER);
n.totlen = cpu_to_je32(8);
- ops.len = c->fsdata_len;
- ops.ooblen = c->fsdata_len;;
+ ops.ooblen = c->fsdata_len;
ops.oobbuf = (uint8_t *)&n;
ops.ooboffs = c->fsdata_pos;
ops.datbuf = NULL;
ops.oobbuf = (uint8_t *)&n;
ops.ooboffs = c->fsdata_pos;
ops.datbuf = NULL;
@@
-1104,10
+1102,10
@@
int jffs2_write_nand_cleanmarker(struct jffs2_sb_info *c,
jeb->offset, ret));
return ret;
}
jeb->offset, ret));
return ret;
}
- if (ops.
retlen != ops.
len) {
+ if (ops.
oobretlen != ops.oob
len) {
D1(printk(KERN_WARNING "jffs2_write_nand_cleanmarker(): "
"Short write for block at %08x: %zd not %d\n",
D1(printk(KERN_WARNING "jffs2_write_nand_cleanmarker(): "
"Short write for block at %08x: %zd not %d\n",
- jeb->offset, ops.
retlen, ops.
len));
+ jeb->offset, ops.
oobretlen, ops.oob
len));
return -EIO;
}
return 0;
return -EIO;
}
return 0;