diff options
author | Cong Wang <amwang@redhat.com> | 2011-11-25 10:14:39 -0500 |
---|---|---|
committer | Cong Wang <xiyou.wangcong@gmail.com> | 2012-03-20 09:48:27 -0400 |
commit | 9b04c5fec43c0da610a2c37f70c5b013101a6ad7 (patch) | |
tree | f04767281b7067fba91cf0d37440bf454c492e38 /mm/filemap.c | |
parent | c3eede8e0a1292d95c051cf947738687b9c42322 (diff) |
mm: remove the second argument of k[un]map_atomic()
Signed-off-by: Cong Wang <amwang@redhat.com>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index b66275757c28..2f8165075a5a 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1318,10 +1318,10 @@ int file_read_actor(read_descriptor_t *desc, struct page *page, | |||
1318 | * taking the kmap. | 1318 | * taking the kmap. |
1319 | */ | 1319 | */ |
1320 | if (!fault_in_pages_writeable(desc->arg.buf, size)) { | 1320 | if (!fault_in_pages_writeable(desc->arg.buf, size)) { |
1321 | kaddr = kmap_atomic(page, KM_USER0); | 1321 | kaddr = kmap_atomic(page); |
1322 | left = __copy_to_user_inatomic(desc->arg.buf, | 1322 | left = __copy_to_user_inatomic(desc->arg.buf, |
1323 | kaddr + offset, size); | 1323 | kaddr + offset, size); |
1324 | kunmap_atomic(kaddr, KM_USER0); | 1324 | kunmap_atomic(kaddr); |
1325 | if (left == 0) | 1325 | if (left == 0) |
1326 | goto success; | 1326 | goto success; |
1327 | } | 1327 | } |
@@ -2045,7 +2045,7 @@ size_t iov_iter_copy_from_user_atomic(struct page *page, | |||
2045 | size_t copied; | 2045 | size_t copied; |
2046 | 2046 | ||
2047 | BUG_ON(!in_atomic()); | 2047 | BUG_ON(!in_atomic()); |
2048 | kaddr = kmap_atomic(page, KM_USER0); | 2048 | kaddr = kmap_atomic(page); |
2049 | if (likely(i->nr_segs == 1)) { | 2049 | if (likely(i->nr_segs == 1)) { |
2050 | int left; | 2050 | int left; |
2051 | char __user *buf = i->iov->iov_base + i->iov_offset; | 2051 | char __user *buf = i->iov->iov_base + i->iov_offset; |
@@ -2055,7 +2055,7 @@ size_t iov_iter_copy_from_user_atomic(struct page *page, | |||
2055 | copied = __iovec_copy_from_user_inatomic(kaddr + offset, | 2055 | copied = __iovec_copy_from_user_inatomic(kaddr + offset, |
2056 | i->iov, i->iov_offset, bytes); | 2056 | i->iov, i->iov_offset, bytes); |
2057 | } | 2057 | } |
2058 | kunmap_atomic(kaddr, KM_USER0); | 2058 | kunmap_atomic(kaddr); |
2059 | 2059 | ||
2060 | return copied; | 2060 | return copied; |
2061 | } | 2061 | } |