Mercurial > yaffs-ecoscentric-gpl
changeset 218:fb0b6002a827
Add kmap for highmem access
| author | charles <charles> |
|---|---|
| date | Thu, 28 Aug 2008 02:42:11 +0000 |
| parents | 27cfa5fc84f9 |
| children | e90502de3d75 |
| files | yaffs_fs.c |
| diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/yaffs_fs.c +++ b/yaffs_fs.c @@ -32,7 +32,7 @@ */ const char *yaffs_fs_c_version = - "$Id: yaffs_fs.c,v 1.68 2008-07-23 03:35:12 charles Exp $"; + "$Id: yaffs_fs.c,v 1.69 2008-08-28 02:42:11 charles Exp $"; extern const char *yaffs_guts_c_version; #include <linux/version.h> @@ -714,13 +714,17 @@ static int yaffs_commit_write(struct fil unsigned to) { - void *addr = page_address(pg) + offset; + void *addr, *kva; + loff_t pos = (((loff_t) pg->index) << PAGE_CACHE_SHIFT) + offset; int nBytes = to - offset; int nWritten; unsigned spos = pos; unsigned saddr = (unsigned)addr; + + kva=kmap(pg); + addr = kva + offset; T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_commit_write addr %x pos %x nBytes %d\n", saddr, @@ -739,6 +743,8 @@ static int yaffs_commit_write(struct fil SetPageUptodate(pg); } + kunmap(pg); + T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_commit_write returning %d\n", nWritten == nBytes ? 0 : nWritten));
