projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
spi: omap2_mcspi PIO RX fix
[powerpc.git]
/
mm
/
filemap_xip.c
diff --git
a/mm/filemap_xip.c
b/mm/filemap_xip.c
index
32132f3
..
f874ae8
100644
(file)
--- 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) {
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)
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
else
-
free_page(zeroes
);
+
__free_page(page
);
spin_unlock(&xip_alloc_lock);
}
}
spin_unlock(&xip_alloc_lock);
}
}
@@
-314,7
+315,7
@@
__xip_file_write(struct file *filp, const char __user *buf,
fault_in_pages_readable(buf, bytes);
kaddr = kmap_atomic(page, KM_USER0);
copied = bytes -
fault_in_pages_readable(buf, bytes);
kaddr = kmap_atomic(page, KM_USER0);
copied = bytes -
- __copy_from_user_inatomic_nocache(kaddr, buf, bytes);
+ __copy_from_user_inatomic_nocache(kaddr
+ offset
, buf, bytes);
kunmap_atomic(kaddr, KM_USER0);
flush_dcache_page(page);
kunmap_atomic(kaddr, KM_USER0);
flush_dcache_page(page);