projects
/
yaffs2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d267d4f
)
Add kmap for highmem access
author
charles
<charles>
Thu, 28 Aug 2008 02:42:11 +0000
(
02:42
+0000)
committer
charles
<charles>
Thu, 28 Aug 2008 02:42:11 +0000
(
02:42
+0000)
yaffs_fs.c
patch
|
blob
|
history
diff --git
a/yaffs_fs.c
b/yaffs_fs.c
index 2d0f8a068ef0755038db472a9068e4aee4944f9a..2672c454f105e3bb7f6238da68ad57e63d542def 100644
(file)
--- a/
yaffs_fs.c
+++ b/
yaffs_fs.c
@@
-32,7
+32,7
@@
*/
const char *yaffs_fs_c_version =
*/
const char *yaffs_fs_c_version =
- "$Id: yaffs_fs.c,v 1.6
8 2008-07-23 03:35:12
charles Exp $";
+ "$Id: yaffs_fs.c,v 1.6
9 2008-08-28 02:42:11
charles Exp $";
extern const char *yaffs_guts_c_version;
#include <linux/version.h>
extern const char *yaffs_guts_c_version;
#include <linux/version.h>
@@
-714,13
+714,17
@@
static int yaffs_commit_write(struct file *f, struct page *pg, unsigned offset,
unsigned to)
{
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;
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,
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 file *f, struct page *pg, unsigned offset,
SetPageUptodate(pg);
}
SetPageUptodate(pg);
}
+ kunmap(pg);
+
T(YAFFS_TRACE_OS,
(KERN_DEBUG "yaffs_commit_write returning %d\n",
nWritten == nBytes ? 0 : nWritten));
T(YAFFS_TRACE_OS,
(KERN_DEBUG "yaffs_commit_write returning %d\n",
nWritten == nBytes ? 0 : nWritten));