X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Ffilemap_xip.c;h=f874ae818ad3812f7cd051972c823c743a154d33;hb=bd3adca52bc43b72c75db3e4c7809d47923b154c;hp=e233fff61b4bd036382a26811849653ebfd4b9e5;hpb=2cfae2739bda8fc5d934977c0ab19f6df1dd6d6c;p=linux-2.6 diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c index e233fff61b..f874ae818a 100644 --- a/mm/filemap_xip.c +++ b/mm/filemap_xip.c @@ -25,14 +25,15 @@ static struct page *__xip_sparse_page; static struct page *xip_sparse_page(void) { if (!__xip_sparse_page) { - unsigned long zeroes = get_zeroed_page(GFP_HIGHUSER); - if (zeroes) { + struct page *page = alloc_page(GFP_HIGHUSER | __GFP_ZERO); + + if (page) { static DEFINE_SPINLOCK(xip_alloc_lock); spin_lock(&xip_alloc_lock); if (!__xip_sparse_page) - __xip_sparse_page = virt_to_page(zeroes); + __xip_sparse_page = page; else - free_page(zeroes); + __free_page(page); spin_unlock(&xip_alloc_lock); } }