]> err.no Git - linux-2.6/commit
fs: convert core functions to zero_user_page
authorNate Diller <nate.diller@gmail.com>
Wed, 9 May 2007 09:35:07 +0000 (02:35 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 9 May 2007 19:30:55 +0000 (12:30 -0700)
commit01f2705daf5a36208e69d7cf95db9c330f843af6
tree2d2c7a042c2466ed985f6e0950450c099f02725f
parent38a23e311b6cd389b9d8af2ea6c28c8cffbe581c
fs: convert core functions to zero_user_page

It's very common for file systems to need to zero part or all of a page,
the simplist way is just to use kmap_atomic() and memset().  There's
actually a library function in include/linux/highmem.h that does exactly
that, but it's confusingly named memclear_highpage_flush(), which is
descriptive of *how* it does the work rather than what the *purpose* is.
So this patchset renames the function to zero_user_page(), and calls it
from the various places that currently open code it.

This first patch introduces the new function call, and converts all the
core kernel callsites, both the open-coded ones and the old
memclear_highpage_flush() ones.  Following this patch is a series of
conversions for each file system individually, per AKPM, and finally a
patch deprecating the old call.  The diffstat below shows the entire
patchset.

[akpm@linux-foundation.org: fix a few things]
Signed-off-by: Nate Diller <nate.diller@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/loop.c
fs/buffer.c
fs/direct-io.c
fs/mpage.c
include/linux/highmem.h
mm/filemap_xip.c
mm/truncate.c