Re: [PATCH] fix fat fs for 2.3.23/2.3.24pre1

Mikael Pettersson (mikpe@csd.uu.se)
Wed, 27 Oct 1999 01:56:59 +0200 (MET DST)


Alexander Viro wrote:

> On Tue, 26 Oct 1999, Mikael Pettersson wrote:
>
> > Compiling the fat file system in kernel 2.3.24pre1 produces
> > these warnings:
> >
> > gcc -D__KERNEL__ -I/tmp/linux-2.3.24-pre1/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -mpreferred-stack-boundary=2 -msoft-float -DCPU=686 -march=i686 -c -o file.o file.c
> > file.c: In function `fat_write_partial_page':
> > file.c:127: warning: assignment makes integer from pointer without a cast
> > file.c:148: warning: passing arg 1 of `__free_page' makes pointer from integer without a cast
> > ...
> > gcc -D__KERNEL__ -I/tmp/linux-2.3.24-pre1/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -mpreferred-stack-boundary=2 -msoft-float -DCPU=686 -march=i686 -c -o mmap.o mmap.c
> > mmap.c:88: warning: initialization from incompatible pointer type
> >
> > The warning in file.c is almost harmless, but mmap.c's nopage
> > was broken completely (it would return an "unsigned long" page
> > address instead of a "struct page*").
>
> fat/mmap.c should be dropped: it is not used and it _always_ had been
> broken. No need to bother with special-casing here.

So why was it there? Old crud nobody has bothered removing?
mmap() does work on fat files, right?

> As for the file.c - yep, it is needed. Ditto for hpfs/file.c, BTW.
> Your fix is not enough - you missed page_cache_entry(). And that one
> was _not_ harmless.

I was reluctant to posting a proposed fix for fat, but I didn't find
an official maintainer for fat in MAINTAINERS, and 2.3.23 has been out
for a while now.

As for missing "page_cache_entry", I just did the obvious to
fix the compiler's type errors. It's just too bad that sometimes
changed semantics isn't made visible as changed types. IMNSHO,
MAP_NR() shouldn't work on "struct page*" values.

Anyway, thanks for posting a real fix.

/ Mikael

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/