diff options
author | Cong Wang <amwang@redhat.com> | 2011-11-25 10:50:19 -0500 |
---|---|---|
committer | Cong Wang <xiyou.wangcong@gmail.com> | 2012-03-20 09:48:29 -0400 |
commit | 97d5dd121c3304c65326f1ce9f04f7d0161827bc (patch) | |
tree | 30c6d241fcb29a89ed62241ef97663b572b19d3e /drivers/staging | |
parent | f0c5b592a5fbc7478fde6d0f84022e6bec9a4302 (diff) |
zcache: remove the second argument of k[un]map_atomic()
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Cong Wang <amwang@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/zcache/zcache-main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c index ef7c52bb1df9..f0843e8a472c 100644 --- a/drivers/staging/zcache/zcache-main.c +++ b/drivers/staging/zcache/zcache-main.c | |||
@@ -421,13 +421,13 @@ static int zbud_decompress(struct page *page, struct zbud_hdr *zh) | |||
421 | } | 421 | } |
422 | ASSERT_SENTINEL(zh, ZBH); | 422 | ASSERT_SENTINEL(zh, ZBH); |
423 | BUG_ON(zh->size == 0 || zh->size > zbud_max_buddy_size()); | 423 | BUG_ON(zh->size == 0 || zh->size > zbud_max_buddy_size()); |
424 | to_va = kmap_atomic(page, KM_USER0); | 424 | to_va = kmap_atomic(page); |
425 | size = zh->size; | 425 | size = zh->size; |
426 | from_va = zbud_data(zh, size); | 426 | from_va = zbud_data(zh, size); |
427 | ret = lzo1x_decompress_safe(from_va, size, to_va, &out_len); | 427 | ret = lzo1x_decompress_safe(from_va, size, to_va, &out_len); |
428 | BUG_ON(ret != LZO_E_OK); | 428 | BUG_ON(ret != LZO_E_OK); |
429 | BUG_ON(out_len != PAGE_SIZE); | 429 | BUG_ON(out_len != PAGE_SIZE); |
430 | kunmap_atomic(to_va, KM_USER0); | 430 | kunmap_atomic(to_va); |
431 | out: | 431 | out: |
432 | spin_unlock(&zbpg->lock); | 432 | spin_unlock(&zbpg->lock); |
433 | return ret; | 433 | return ret; |
@@ -676,13 +676,13 @@ static struct zv_hdr *zv_create(struct xv_pool *xvpool, uint32_t pool_id, | |||
676 | goto out; | 676 | goto out; |
677 | atomic_inc(&zv_curr_dist_counts[chunks]); | 677 | atomic_inc(&zv_curr_dist_counts[chunks]); |
678 | atomic_inc(&zv_cumul_dist_counts[chunks]); | 678 | atomic_inc(&zv_cumul_dist_counts[chunks]); |
679 | zv = kmap_atomic(page, KM_USER0) + offset; | 679 | zv = kmap_atomic(page) + offset; |
680 | zv->index = index; | 680 | zv->index = index; |
681 | zv->oid = *oid; | 681 | zv->oid = *oid; |
682 | zv->pool_id = pool_id; | 682 | zv->pool_id = pool_id; |
683 | SET_SENTINEL(zv, ZVH); | 683 | SET_SENTINEL(zv, ZVH); |
684 | memcpy((char *)zv + sizeof(struct zv_hdr), cdata, clen); | 684 | memcpy((char *)zv + sizeof(struct zv_hdr), cdata, clen); |
685 | kunmap_atomic(zv, KM_USER0); | 685 | kunmap_atomic(zv); |
686 | out: | 686 | out: |
687 | return zv; | 687 | return zv; |
688 | } | 688 | } |
@@ -718,10 +718,10 @@ static void zv_decompress(struct page *page, struct zv_hdr *zv) | |||
718 | ASSERT_SENTINEL(zv, ZVH); | 718 | ASSERT_SENTINEL(zv, ZVH); |
719 | size = xv_get_object_size(zv) - sizeof(*zv); | 719 | size = xv_get_object_size(zv) - sizeof(*zv); |
720 | BUG_ON(size == 0); | 720 | BUG_ON(size == 0); |
721 | to_va = kmap_atomic(page, KM_USER0); | 721 | to_va = kmap_atomic(page); |
722 | ret = lzo1x_decompress_safe((char *)zv + sizeof(*zv), | 722 | ret = lzo1x_decompress_safe((char *)zv + sizeof(*zv), |
723 | size, to_va, &clen); | 723 | size, to_va, &clen); |
724 | kunmap_atomic(to_va, KM_USER0); | 724 | kunmap_atomic(to_va); |
725 | BUG_ON(ret != LZO_E_OK); | 725 | BUG_ON(ret != LZO_E_OK); |
726 | BUG_ON(clen != PAGE_SIZE); | 726 | BUG_ON(clen != PAGE_SIZE); |
727 | } | 727 | } |
@@ -1300,12 +1300,12 @@ static int zcache_compress(struct page *from, void **out_va, size_t *out_len) | |||
1300 | BUG_ON(!irqs_disabled()); | 1300 | BUG_ON(!irqs_disabled()); |
1301 | if (unlikely(dmem == NULL || wmem == NULL)) | 1301 | if (unlikely(dmem == NULL || wmem == NULL)) |
1302 | goto out; /* no buffer, so can't compress */ | 1302 | goto out; /* no buffer, so can't compress */ |
1303 | from_va = kmap_atomic(from, KM_USER0); | 1303 | from_va = kmap_atomic(from); |
1304 | mb(); | 1304 | mb(); |
1305 | ret = lzo1x_1_compress(from_va, PAGE_SIZE, dmem, out_len, wmem); | 1305 | ret = lzo1x_1_compress(from_va, PAGE_SIZE, dmem, out_len, wmem); |
1306 | BUG_ON(ret != LZO_E_OK); | 1306 | BUG_ON(ret != LZO_E_OK); |
1307 | *out_va = dmem; | 1307 | *out_va = dmem; |
1308 | kunmap_atomic(from_va, KM_USER0); | 1308 | kunmap_atomic(from_va); |
1309 | ret = 1; | 1309 | ret = 1; |
1310 | out: | 1310 | out: |
1311 | return ret; | 1311 | return ret; |