summaryrefslogtreecommitdiff
path: root/fs/jffs2/scan.c
diff options
context:
space:
mode:
authorArtem B. Bityutskiy <dedekind@infradead.org>2005-09-30 14:59:17 +0100
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 23:01:48 +0100
commitdaba5cc4bcd025a9b4fd02a9117c71bfd400d811 (patch)
treeda74b64b3bbd4ae215ced6d2d54abe7fdf83818e /fs/jffs2/scan.c
parent83a368380e172c1b2e9fd6ec2a62e457684adf0c (diff)
[JFFS2] Fix dataflash support
- assume wbuf may be of size which is not power of 2 - don't make strange assumption about not padding wbuf for DataFlash - use wbuf = DataFlash page and eraseblock >= 8 Dataflash pages From: Peter Menzebach <pm-mtd@mw-itcon.de> Acked-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/scan.c')
-rw-r--r--fs/jffs2/scan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index 8df7456472b8..805a166469d2 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: scan.c,v 1.124 2005/09/21 13:05:22 dedekind Exp $
+ * $Id: scan.c,v 1.125 2005/09/30 13:59:13 dedekind Exp $
*
*/
#include <linux/kernel.h>
@@ -233,12 +233,12 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
c->nextblock->dirty_size = 0;
}
#ifdef CONFIG_JFFS2_FS_WRITEBUFFER
- if (!jffs2_can_mark_obsolete(c) && c->nextblock && (c->nextblock->free_size & (c->wbuf_pagesize-1))) {
+ if (!jffs2_can_mark_obsolete(c) && c->nextblock && (c->nextblock->free_size % c->wbuf_pagesize)) {
/* If we're going to start writing into a block which already
contains data, and the end of the data isn't page-aligned,
skip a little and align it. */
- uint32_t skip = c->nextblock->free_size & (c->wbuf_pagesize-1);
+ uint32_t skip = c->nextblock->free_size % c->wbuf_pagesize;
D1(printk(KERN_DEBUG "jffs2_scan_medium(): Skipping %d bytes in nextblock to ensure page alignment\n",
skip));