aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorCong Wang <amwang@redhat.com>2011-11-25 10:14:40 -0500
committerCong Wang <xiyou.wangcong@gmail.com>2012-03-20 09:48:28 -0400
commitb85417860172ff693dc115d7999805fc240cec1c (patch)
treee7f1c8ac18958e7bcb9182caa8639104384e44f9 /net/sunrpc
parent6114eab535ab49239e0a6ce08eb9243664aef993 (diff)
sunrpc: remove the second argument of k[un]map_atomic()
Signed-off-by: Cong Wang <amwang@redhat.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_wrap.c4
-rw-r--r--net/sunrpc/socklib.c4
-rw-r--r--net/sunrpc/xdr.c20
-rw-r--r--net/sunrpc/xprtrdma/rpc_rdma.c8
4 files changed, 18 insertions, 18 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c
index 2763e3e48db4..38f388c39dce 100644
--- a/net/sunrpc/auth_gss/gss_krb5_wrap.c
+++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c
@@ -82,9 +82,9 @@ gss_krb5_remove_padding(struct xdr_buf *buf, int blocksize)
82 >>PAGE_CACHE_SHIFT; 82 >>PAGE_CACHE_SHIFT;
83 unsigned int offset = (buf->page_base + len - 1) 83 unsigned int offset = (buf->page_base + len - 1)
84 & (PAGE_CACHE_SIZE - 1); 84 & (PAGE_CACHE_SIZE - 1);
85 ptr = kmap_atomic(buf->pages[last], KM_USER0); 85 ptr = kmap_atomic(buf->pages[last]);
86 pad = *(ptr + offset); 86 pad = *(ptr + offset);
87 kunmap_atomic(ptr, KM_USER0); 87 kunmap_atomic(ptr);
88 goto out; 88 goto out;
89 } else 89 } else
90 len -= buf->page_len; 90 len -= buf->page_len;
diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c
index 145e6784f508..0a648c502fc3 100644
--- a/net/sunrpc/socklib.c
+++ b/net/sunrpc/socklib.c
@@ -114,7 +114,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct
114 } 114 }
115 115
116 len = PAGE_CACHE_SIZE; 116 len = PAGE_CACHE_SIZE;
117 kaddr = kmap_atomic(*ppage, KM_SKB_SUNRPC_DATA); 117 kaddr = kmap_atomic(*ppage);
118 if (base) { 118 if (base) {
119 len -= base; 119 len -= base;
120 if (pglen < len) 120 if (pglen < len)
@@ -127,7 +127,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct
127 ret = copy_actor(desc, kaddr, len); 127 ret = copy_actor(desc, kaddr, len);
128 } 128 }
129 flush_dcache_page(*ppage); 129 flush_dcache_page(*ppage);
130 kunmap_atomic(kaddr, KM_SKB_SUNRPC_DATA); 130 kunmap_atomic(kaddr);
131 copied += ret; 131 copied += ret;
132 if (ret != len || !desc->count) 132 if (ret != len || !desc->count)
133 goto out; 133 goto out;
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index 593f4c605305..b97a3dd9a60a 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -122,9 +122,9 @@ xdr_terminate_string(struct xdr_buf *buf, const u32 len)
122{ 122{
123 char *kaddr; 123 char *kaddr;
124 124
125 kaddr = kmap_atomic(buf->pages[0], KM_USER0); 125 kaddr = kmap_atomic(buf->pages[0]);
126 kaddr[buf->page_base + len] = '\0'; 126 kaddr[buf->page_base + len] = '\0';
127 kunmap_atomic(kaddr, KM_USER0); 127 kunmap_atomic(kaddr);
128} 128}
129EXPORT_SYMBOL_GPL(xdr_terminate_string); 129EXPORT_SYMBOL_GPL(xdr_terminate_string);
130 130
@@ -232,12 +232,12 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base,
232 pgto_base -= copy; 232 pgto_base -= copy;
233 pgfrom_base -= copy; 233 pgfrom_base -= copy;
234 234
235 vto = kmap_atomic(*pgto, KM_USER0); 235 vto = kmap_atomic(*pgto);
236 vfrom = kmap_atomic(*pgfrom, KM_USER1); 236 vfrom = kmap_atomic(*pgfrom);
237 memmove(vto + pgto_base, vfrom + pgfrom_base, copy); 237 memmove(vto + pgto_base, vfrom + pgfrom_base, copy);
238 flush_dcache_page(*pgto); 238 flush_dcache_page(*pgto);
239 kunmap_atomic(vfrom, KM_USER1); 239 kunmap_atomic(vfrom);
240 kunmap_atomic(vto, KM_USER0); 240 kunmap_atomic(vto);
241 241
242 } while ((len -= copy) != 0); 242 } while ((len -= copy) != 0);
243} 243}
@@ -267,9 +267,9 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len)
267 if (copy > len) 267 if (copy > len)
268 copy = len; 268 copy = len;
269 269
270 vto = kmap_atomic(*pgto, KM_USER0); 270 vto = kmap_atomic(*pgto);
271 memcpy(vto + pgbase, p, copy); 271 memcpy(vto + pgbase, p, copy);
272 kunmap_atomic(vto, KM_USER0); 272 kunmap_atomic(vto);
273 273
274 len -= copy; 274 len -= copy;
275 if (len == 0) 275 if (len == 0)
@@ -311,9 +311,9 @@ _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len)
311 if (copy > len) 311 if (copy > len)
312 copy = len; 312 copy = len;
313 313
314 vfrom = kmap_atomic(*pgfrom, KM_USER0); 314 vfrom = kmap_atomic(*pgfrom);
315 memcpy(p, vfrom + pgbase, copy); 315 memcpy(p, vfrom + pgbase, copy);
316 kunmap_atomic(vfrom, KM_USER0); 316 kunmap_atomic(vfrom);
317 317
318 pgbase += copy; 318 pgbase += copy;
319 if (pgbase == PAGE_CACHE_SIZE) { 319 if (pgbase == PAGE_CACHE_SIZE) {
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
index 554d0814c875..1776e5731dcf 100644
--- a/net/sunrpc/xprtrdma/rpc_rdma.c
+++ b/net/sunrpc/xprtrdma/rpc_rdma.c
@@ -338,9 +338,9 @@ rpcrdma_inline_pullup(struct rpc_rqst *rqst, int pad)
338 curlen = copy_len; 338 curlen = copy_len;
339 dprintk("RPC: %s: page %d destp 0x%p len %d curlen %d\n", 339 dprintk("RPC: %s: page %d destp 0x%p len %d curlen %d\n",
340 __func__, i, destp, copy_len, curlen); 340 __func__, i, destp, copy_len, curlen);
341 srcp = kmap_atomic(ppages[i], KM_SKB_SUNRPC_DATA); 341 srcp = kmap_atomic(ppages[i]);
342 memcpy(destp, srcp+page_base, curlen); 342 memcpy(destp, srcp+page_base, curlen);
343 kunmap_atomic(srcp, KM_SKB_SUNRPC_DATA); 343 kunmap_atomic(srcp);
344 rqst->rq_svec[0].iov_len += curlen; 344 rqst->rq_svec[0].iov_len += curlen;
345 destp += curlen; 345 destp += curlen;
346 copy_len -= curlen; 346 copy_len -= curlen;
@@ -639,10 +639,10 @@ rpcrdma_inline_fixup(struct rpc_rqst *rqst, char *srcp, int copy_len, int pad)
639 dprintk("RPC: %s: page %d" 639 dprintk("RPC: %s: page %d"
640 " srcp 0x%p len %d curlen %d\n", 640 " srcp 0x%p len %d curlen %d\n",
641 __func__, i, srcp, copy_len, curlen); 641 __func__, i, srcp, copy_len, curlen);
642 destp = kmap_atomic(ppages[i], KM_SKB_SUNRPC_DATA); 642 destp = kmap_atomic(ppages[i]);
643 memcpy(destp + page_base, srcp, curlen); 643 memcpy(destp + page_base, srcp, curlen);
644 flush_dcache_page(ppages[i]); 644 flush_dcache_page(ppages[i]);
645 kunmap_atomic(destp, KM_SKB_SUNRPC_DATA); 645 kunmap_atomic(destp);
646 srcp += curlen; 646 srcp += curlen;
647 copy_len -= curlen; 647 copy_len -= curlen;
648 if (copy_len == 0) 648 if (copy_len == 0)