@@ -1535,10 +1535,10 @@ static u32 ceph_crc32c_page(u32 crc, struct page *page,
{
char *kaddr;
- kaddr = kmap(page);
+ kaddr = kmap_thread(page);
BUG_ON(kaddr == NULL);
crc = crc32c(crc, kaddr + page_offset, length);
- kunmap(page);
+ kunmap_thread(page);
return crc;
}
@@ -441,14 +441,14 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset,
end = start + skb_frag_size(frag);
if ((copy = end - offset) > 0) {
struct page *page = skb_frag_page(frag);
- u8 *vaddr = kmap(page);
+ u8 *vaddr = kmap_thread(page);
if (copy > len)
copy = len;
n = INDIRECT_CALL_1(cb, simple_copy_to_iter,
vaddr + skb_frag_off(frag) + offset - start,
copy, data, to);
- kunmap(page);
+ kunmap_thread(page);
offset += n;
if (n != copy)
goto short_copy;
@@ -2846,11 +2846,11 @@ ssize_t sock_no_sendpage(struct socket *sock, struct page *page, int offset, siz
ssize_t res;
struct msghdr msg = {.msg_flags = flags};
struct kvec iov;
- char *kaddr = kmap(page);
+ char *kaddr = kmap_thread(page);
iov.iov_base = kaddr + offset;
iov.iov_len = size;
res = kernel_sendmsg(sock, &msg, &iov, 1, size);
- kunmap(page);
+ kunmap_thread(page);
return res;
}
EXPORT_SYMBOL(sock_no_sendpage);
@@ -2861,12 +2861,12 @@ ssize_t sock_no_sendpage_locked(struct sock *sk, struct page *page,
ssize_t res;
struct msghdr msg = {.msg_flags = flags};
struct kvec iov;
- char *kaddr = kmap(page);
+ char *kaddr = kmap_thread(page);
iov.iov_base = kaddr + offset;
iov.iov_len = size;
res = kernel_sendmsg_locked(sk, &msg, &iov, 1, size);
- kunmap(page);
+ kunmap_thread(page);
return res;
}
EXPORT_SYMBOL(sock_no_sendpage_locked);
@@ -949,9 +949,9 @@ csum_page(struct page *page, int offset, int copy)
{
char *kaddr;
__wsum csum;
- kaddr = kmap(page);
+ kaddr = kmap_thread(page);
csum = csum_partial(kaddr + offset, copy, 0);
- kunmap(page);
+ kunmap_thread(page);
return csum;
}
@@ -935,9 +935,9 @@ static ssize_t cache_downcall(struct address_space *mapping,
if (!page)
goto out_slow;
- kaddr = kmap(page);
+ kaddr = kmap_thread(page);
ret = cache_do_downcall(kaddr, buf, count, cd);
- kunmap(page);
+ kunmap_thread(page);
unlock_page(page);
put_page(page);
return ret;
@@ -1353,7 +1353,7 @@ xdr_xcode_array2(struct xdr_buf *buf, unsigned int base,
base &= ~PAGE_MASK;
avail_page = min_t(unsigned int, PAGE_SIZE - base,
avail_here);
- c = kmap(*ppages) + base;
+ c = kmap_thread(*ppages) + base;
while (avail_here) {
avail_here -= avail_page;
@@ -1429,9 +1429,9 @@ xdr_xcode_array2(struct xdr_buf *buf, unsigned int base,
}
}
if (avail_here) {
- kunmap(*ppages);
+ kunmap_thread(*ppages);
ppages++;
- c = kmap(*ppages);
+ c = kmap_thread(*ppages);
}
avail_page = min(avail_here,
@@ -1471,7 +1471,7 @@ xdr_xcode_array2(struct xdr_buf *buf, unsigned int base,
out:
kfree(elem);
if (ppages)
- kunmap(*ppages);
+ kunmap_thread(*ppages);
return err;
}
@@ -576,13 +576,13 @@ int tls_device_sendpage(struct sock *sk, struct page *page,
goto out;
}
- kaddr = kmap(page);
+ kaddr = kmap_thread(page);
iov.iov_base = kaddr + offset;
iov.iov_len = size;
iov_iter_kvec(&msg_iter, WRITE, &iov, 1, size);
rc = tls_push_data(sk, &msg_iter, size,
flags, TLS_RECORD_TYPE_DATA);
- kunmap(page);
+ kunmap_thread(page);
out:
release_sock(sk);