patch-2.3.29 linux/fs/ncpfs/mmap.c
Next file: linux/fs/nfs/dir.c
Previous file: linux/fs/ncpfs/dir.c
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Sat Nov 20 10:09:05 1999
- Orig file:
v2.3.28/linux/fs/ncpfs/mmap.c
- Orig date:
Thu Nov 11 20:11:49 1999
diff -u --recursive --new-file v2.3.28/linux/fs/ncpfs/mmap.c linux/fs/ncpfs/mmap.c
@@ -43,10 +43,11 @@
int bufsize;
int pos;
- page = alloc_page(GFP_KERNEL);
+ page = alloc_page(GFP_HIGHMEM); /* ncpfs has nothing against GFP_HIGHMEM
+ as long as recvmsg and memset works on it */
if (!page)
return page;
- pg_addr = page_address(page);
+ pg_addr = kmap(page);
address &= PAGE_MASK;
pos = address - area->vm_start + (area->vm_pgoff << PAGE_SHIFT);
@@ -87,6 +88,7 @@
if (already_read < PAGE_SIZE)
memset((char*)(pg_addr + already_read), 0,
PAGE_SIZE - already_read);
+ kunmap(page);
return page;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)