64 bit problem in fs/jffs2/wbuf.c

Jörn Engel joern at wohnheim.fh-wedel.de
Wed Jun 26 06:01:36 EDT 2002


> Thomas or David, is this a really stupid idea or can I search for
> further bugs elsewhere?
> 
> Joern
> 
> --- wbuf.c	Wed Jun 19 18:56:26 2002
> +++ wbuf.c.new	Wed Jun 26 11:27:27 2002
> @@ -234,7 +234,7 @@
>  		c->wbuf_len = PAGE_MOD(to);			
>  	} 
>  
> -	if (to != PAD(c->wbuf_ofs + c->wbuf_len)) {
> +	if ((unsigned long)to != PAD(c->wbuf_ofs + c->wbuf_len)) {
>  		/* We're not writing immediately after the writebuffer. Bad. */
>  		printk(KERN_CRIT "jffs2_flash_writev(): Non-contiguous write to %08lx\n", (unsigned long)to);
>  		if (c->wbuf_len)

s/unsigned long/uint32_t/

Ok, it was stupid, but is there anything else inherently wrong with
it?

Joern




More information about the linux-mtd mailing list