Recent builds get tons of warnings about memclear_highpage_flush
beeing deprecated. Turns out it's replaced by zero_user_page
which takes an additional argument.
Now folks, deprecated is for actual functionality going away, there
is no need to mark the old name deprecated for such a trivial
paramter change and rename. This stuff should go to Linus in one
patch that doesn't create utterly useless warnings and keeps around
stale interfaces.
Here's a patch to kill memclear_highpage_flush and convert the reaming
user to make the build a littler more silent, it's more than noisy
enough due to all the useless addition of __deprecated or __must_check
to widely used functionality and gcc stupid false positives.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/fs/nfs/read.c
===================================================================
--- linux-2.6.orig/fs/nfs/read.c 2007-05-15 14:19:59.000000000 +0200
+++ linux-2.6/fs/nfs/read.c 2007-05-15 14:21:24.000000000 +0200
@@ -79,7 +79,7 @@ void nfs_readdata_release(void *data)
static
int nfs_return_empty_page(struct page *page)
{
- memclear_highpage_flush(page, 0, PAGE_CACHE_SIZE);
+ zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
SetPageUptodate(page);
unlock_page(page);
return 0;
@@ -103,10 +103,10 @@ static void nfs_readpage_truncate_uninit
pglen = PAGE_CACHE_SIZE - base;
for (;;) {
if (remainder <= pglen) {
- memclear_highpage_flush(*pages, base, remainder);
+ zero_user_page(*pages, base, remainder, KM_USER0);
break;
}
- memclear_highpage_flush(*pages, base, pglen);
+ zero_user_page(*pages, base, pglen, KM_USER0);
pages++;
remainder -= pglen;
pglen = PAGE_CACHE_SIZE;
@@ -130,7 +130,7 @@ static int nfs_readpage_async(struct nfs
return PTR_ERR(new);
}
if (len < PAGE_CACHE_SIZE)
- memclear_highpage_flush(page, len, PAGE_CACHE_SIZE - len);
+ zero_user_page(page, len, PAGE_CACHE_SIZE - len, KM_USER0);
nfs_list_add_request(new, &one_request);
...