diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap.c | 4 | ||||
-rw-r--r-- | mm/filemap.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 368678c2d531..807a463fd5ed 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
16 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
17 | #include <linux/uaccess.h> | ||
17 | #include <linux/aio.h> | 18 | #include <linux/aio.h> |
18 | #include <linux/capability.h> | 19 | #include <linux/capability.h> |
19 | #include <linux/kernel_stat.h> | 20 | #include <linux/kernel_stat.h> |
@@ -38,7 +39,6 @@ | |||
38 | */ | 39 | */ |
39 | #include <linux/buffer_head.h> /* for generic_osync_inode */ | 40 | #include <linux/buffer_head.h> /* for generic_osync_inode */ |
40 | 41 | ||
41 | #include <asm/uaccess.h> | ||
42 | #include <asm/mman.h> | 42 | #include <asm/mman.h> |
43 | 43 | ||
44 | static ssize_t | 44 | static ssize_t |
@@ -1902,7 +1902,7 @@ __filemap_copy_from_user_iovec(char *vaddr, | |||
1902 | int copy = min(bytes, iov->iov_len - base); | 1902 | int copy = min(bytes, iov->iov_len - base); |
1903 | 1903 | ||
1904 | base = 0; | 1904 | base = 0; |
1905 | left = __copy_from_user_inatomic(vaddr, buf, copy); | 1905 | left = __copy_from_user_inatomic_nocache(vaddr, buf, copy); |
1906 | copied += copy; | 1906 | copied += copy; |
1907 | bytes -= copy; | 1907 | bytes -= copy; |
1908 | vaddr += copy; | 1908 | vaddr += copy; |
diff --git a/mm/filemap.h b/mm/filemap.h index 13793ba0ce17..5683cde22055 100644 --- a/mm/filemap.h +++ b/mm/filemap.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/highmem.h> | 13 | #include <linux/highmem.h> |
14 | #include <linux/uio.h> | 14 | #include <linux/uio.h> |
15 | #include <linux/config.h> | 15 | #include <linux/config.h> |
16 | #include <asm/uaccess.h> | 16 | #include <linux/uaccess.h> |
17 | 17 | ||
18 | size_t | 18 | size_t |
19 | __filemap_copy_from_user_iovec(char *vaddr, | 19 | __filemap_copy_from_user_iovec(char *vaddr, |
@@ -34,13 +34,13 @@ filemap_copy_from_user(struct page *page, unsigned long offset, | |||
34 | int left; | 34 | int left; |
35 | 35 | ||
36 | kaddr = kmap_atomic(page, KM_USER0); | 36 | kaddr = kmap_atomic(page, KM_USER0); |
37 | left = __copy_from_user_inatomic(kaddr + offset, buf, bytes); | 37 | left = __copy_from_user_inatomic_nocache(kaddr + offset, buf, bytes); |
38 | kunmap_atomic(kaddr, KM_USER0); | 38 | kunmap_atomic(kaddr, KM_USER0); |
39 | 39 | ||
40 | if (left != 0) { | 40 | if (left != 0) { |
41 | /* Do it the slow way */ | 41 | /* Do it the slow way */ |
42 | kaddr = kmap(page); | 42 | kaddr = kmap(page); |
43 | left = __copy_from_user(kaddr + offset, buf, bytes); | 43 | left = __copy_from_user_nocache(kaddr + offset, buf, bytes); |
44 | kunmap(page); | 44 | kunmap(page); |
45 | } | 45 | } |
46 | return bytes - left; | 46 | return bytes - left; |