diff options
-rw-r--r-- | fs/btrfs/compression.c | 12 | ||||
-rw-r--r-- | fs/btrfs/extent_io.c | 16 | ||||
-rw-r--r-- | fs/btrfs/file-item.c | 4 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 26 | ||||
-rw-r--r-- | fs/btrfs/lzo.c | 4 | ||||
-rw-r--r-- | fs/btrfs/scrub.c | 8 | ||||
-rw-r--r-- | fs/btrfs/zlib.c | 4 |
7 files changed, 37 insertions, 37 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index d02c27cd14c7..b805afb37fa8 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c | |||
@@ -120,10 +120,10 @@ static int check_compressed_csum(struct inode *inode, | |||
120 | page = cb->compressed_pages[i]; | 120 | page = cb->compressed_pages[i]; |
121 | csum = ~(u32)0; | 121 | csum = ~(u32)0; |
122 | 122 | ||
123 | kaddr = kmap_atomic(page, KM_USER0); | 123 | kaddr = kmap_atomic(page); |
124 | csum = btrfs_csum_data(root, kaddr, csum, PAGE_CACHE_SIZE); | 124 | csum = btrfs_csum_data(root, kaddr, csum, PAGE_CACHE_SIZE); |
125 | btrfs_csum_final(csum, (char *)&csum); | 125 | btrfs_csum_final(csum, (char *)&csum); |
126 | kunmap_atomic(kaddr, KM_USER0); | 126 | kunmap_atomic(kaddr); |
127 | 127 | ||
128 | if (csum != *cb_sum) { | 128 | if (csum != *cb_sum) { |
129 | printk(KERN_INFO "btrfs csum failed ino %llu " | 129 | printk(KERN_INFO "btrfs csum failed ino %llu " |
@@ -521,10 +521,10 @@ static noinline int add_ra_bio_pages(struct inode *inode, | |||
521 | if (zero_offset) { | 521 | if (zero_offset) { |
522 | int zeros; | 522 | int zeros; |
523 | zeros = PAGE_CACHE_SIZE - zero_offset; | 523 | zeros = PAGE_CACHE_SIZE - zero_offset; |
524 | userpage = kmap_atomic(page, KM_USER0); | 524 | userpage = kmap_atomic(page); |
525 | memset(userpage + zero_offset, 0, zeros); | 525 | memset(userpage + zero_offset, 0, zeros); |
526 | flush_dcache_page(page); | 526 | flush_dcache_page(page); |
527 | kunmap_atomic(userpage, KM_USER0); | 527 | kunmap_atomic(userpage); |
528 | } | 528 | } |
529 | } | 529 | } |
530 | 530 | ||
@@ -993,9 +993,9 @@ int btrfs_decompress_buf2page(char *buf, unsigned long buf_start, | |||
993 | bytes = min(PAGE_CACHE_SIZE - *pg_offset, | 993 | bytes = min(PAGE_CACHE_SIZE - *pg_offset, |
994 | PAGE_CACHE_SIZE - buf_offset); | 994 | PAGE_CACHE_SIZE - buf_offset); |
995 | bytes = min(bytes, working_bytes); | 995 | bytes = min(bytes, working_bytes); |
996 | kaddr = kmap_atomic(page_out, KM_USER0); | 996 | kaddr = kmap_atomic(page_out); |
997 | memcpy(kaddr + *pg_offset, buf + buf_offset, bytes); | 997 | memcpy(kaddr + *pg_offset, buf + buf_offset, bytes); |
998 | kunmap_atomic(kaddr, KM_USER0); | 998 | kunmap_atomic(kaddr); |
999 | flush_dcache_page(page_out); | 999 | flush_dcache_page(page_out); |
1000 | 1000 | ||
1001 | *pg_offset += bytes; | 1001 | *pg_offset += bytes; |
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index a55fbe6252de..2862454bcdb3 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -2546,10 +2546,10 @@ static int __extent_read_full_page(struct extent_io_tree *tree, | |||
2546 | 2546 | ||
2547 | if (zero_offset) { | 2547 | if (zero_offset) { |
2548 | iosize = PAGE_CACHE_SIZE - zero_offset; | 2548 | iosize = PAGE_CACHE_SIZE - zero_offset; |
2549 | userpage = kmap_atomic(page, KM_USER0); | 2549 | userpage = kmap_atomic(page); |
2550 | memset(userpage + zero_offset, 0, iosize); | 2550 | memset(userpage + zero_offset, 0, iosize); |
2551 | flush_dcache_page(page); | 2551 | flush_dcache_page(page); |
2552 | kunmap_atomic(userpage, KM_USER0); | 2552 | kunmap_atomic(userpage); |
2553 | } | 2553 | } |
2554 | } | 2554 | } |
2555 | while (cur <= end) { | 2555 | while (cur <= end) { |
@@ -2558,10 +2558,10 @@ static int __extent_read_full_page(struct extent_io_tree *tree, | |||
2558 | struct extent_state *cached = NULL; | 2558 | struct extent_state *cached = NULL; |
2559 | 2559 | ||
2560 | iosize = PAGE_CACHE_SIZE - pg_offset; | 2560 | iosize = PAGE_CACHE_SIZE - pg_offset; |
2561 | userpage = kmap_atomic(page, KM_USER0); | 2561 | userpage = kmap_atomic(page); |
2562 | memset(userpage + pg_offset, 0, iosize); | 2562 | memset(userpage + pg_offset, 0, iosize); |
2563 | flush_dcache_page(page); | 2563 | flush_dcache_page(page); |
2564 | kunmap_atomic(userpage, KM_USER0); | 2564 | kunmap_atomic(userpage); |
2565 | set_extent_uptodate(tree, cur, cur + iosize - 1, | 2565 | set_extent_uptodate(tree, cur, cur + iosize - 1, |
2566 | &cached, GFP_NOFS); | 2566 | &cached, GFP_NOFS); |
2567 | unlock_extent_cached(tree, cur, cur + iosize - 1, | 2567 | unlock_extent_cached(tree, cur, cur + iosize - 1, |
@@ -2607,10 +2607,10 @@ static int __extent_read_full_page(struct extent_io_tree *tree, | |||
2607 | char *userpage; | 2607 | char *userpage; |
2608 | struct extent_state *cached = NULL; | 2608 | struct extent_state *cached = NULL; |
2609 | 2609 | ||
2610 | userpage = kmap_atomic(page, KM_USER0); | 2610 | userpage = kmap_atomic(page); |
2611 | memset(userpage + pg_offset, 0, iosize); | 2611 | memset(userpage + pg_offset, 0, iosize); |
2612 | flush_dcache_page(page); | 2612 | flush_dcache_page(page); |
2613 | kunmap_atomic(userpage, KM_USER0); | 2613 | kunmap_atomic(userpage); |
2614 | 2614 | ||
2615 | set_extent_uptodate(tree, cur, cur + iosize - 1, | 2615 | set_extent_uptodate(tree, cur, cur + iosize - 1, |
2616 | &cached, GFP_NOFS); | 2616 | &cached, GFP_NOFS); |
@@ -2756,10 +2756,10 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, | |||
2756 | if (page->index == end_index) { | 2756 | if (page->index == end_index) { |
2757 | char *userpage; | 2757 | char *userpage; |
2758 | 2758 | ||
2759 | userpage = kmap_atomic(page, KM_USER0); | 2759 | userpage = kmap_atomic(page); |
2760 | memset(userpage + pg_offset, 0, | 2760 | memset(userpage + pg_offset, 0, |
2761 | PAGE_CACHE_SIZE - pg_offset); | 2761 | PAGE_CACHE_SIZE - pg_offset); |
2762 | kunmap_atomic(userpage, KM_USER0); | 2762 | kunmap_atomic(userpage); |
2763 | flush_dcache_page(page); | 2763 | flush_dcache_page(page); |
2764 | } | 2764 | } |
2765 | pg_offset = 0; | 2765 | pg_offset = 0; |
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index c7fb3a4247d3..078b4fd54500 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c | |||
@@ -447,13 +447,13 @@ int btrfs_csum_one_bio(struct btrfs_root *root, struct inode *inode, | |||
447 | sums->bytenr = ordered->start; | 447 | sums->bytenr = ordered->start; |
448 | } | 448 | } |
449 | 449 | ||
450 | data = kmap_atomic(bvec->bv_page, KM_USER0); | 450 | data = kmap_atomic(bvec->bv_page); |
451 | sector_sum->sum = ~(u32)0; | 451 | sector_sum->sum = ~(u32)0; |
452 | sector_sum->sum = btrfs_csum_data(root, | 452 | sector_sum->sum = btrfs_csum_data(root, |
453 | data + bvec->bv_offset, | 453 | data + bvec->bv_offset, |
454 | sector_sum->sum, | 454 | sector_sum->sum, |
455 | bvec->bv_len); | 455 | bvec->bv_len); |
456 | kunmap_atomic(data, KM_USER0); | 456 | kunmap_atomic(data); |
457 | btrfs_csum_final(sector_sum->sum, | 457 | btrfs_csum_final(sector_sum->sum, |
458 | (char *)§or_sum->sum); | 458 | (char *)§or_sum->sum); |
459 | sector_sum->bytenr = disk_bytenr; | 459 | sector_sum->bytenr = disk_bytenr; |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 892b34785ccc..3a0b5c1f9d31 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -173,9 +173,9 @@ static noinline int insert_inline_extent(struct btrfs_trans_handle *trans, | |||
173 | cur_size = min_t(unsigned long, compressed_size, | 173 | cur_size = min_t(unsigned long, compressed_size, |
174 | PAGE_CACHE_SIZE); | 174 | PAGE_CACHE_SIZE); |
175 | 175 | ||
176 | kaddr = kmap_atomic(cpage, KM_USER0); | 176 | kaddr = kmap_atomic(cpage); |
177 | write_extent_buffer(leaf, kaddr, ptr, cur_size); | 177 | write_extent_buffer(leaf, kaddr, ptr, cur_size); |
178 | kunmap_atomic(kaddr, KM_USER0); | 178 | kunmap_atomic(kaddr); |
179 | 179 | ||
180 | i++; | 180 | i++; |
181 | ptr += cur_size; | 181 | ptr += cur_size; |
@@ -187,10 +187,10 @@ static noinline int insert_inline_extent(struct btrfs_trans_handle *trans, | |||
187 | page = find_get_page(inode->i_mapping, | 187 | page = find_get_page(inode->i_mapping, |
188 | start >> PAGE_CACHE_SHIFT); | 188 | start >> PAGE_CACHE_SHIFT); |
189 | btrfs_set_file_extent_compression(leaf, ei, 0); | 189 | btrfs_set_file_extent_compression(leaf, ei, 0); |
190 | kaddr = kmap_atomic(page, KM_USER0); | 190 | kaddr = kmap_atomic(page); |
191 | offset = start & (PAGE_CACHE_SIZE - 1); | 191 | offset = start & (PAGE_CACHE_SIZE - 1); |
192 | write_extent_buffer(leaf, kaddr + offset, ptr, size); | 192 | write_extent_buffer(leaf, kaddr + offset, ptr, size); |
193 | kunmap_atomic(kaddr, KM_USER0); | 193 | kunmap_atomic(kaddr); |
194 | page_cache_release(page); | 194 | page_cache_release(page); |
195 | } | 195 | } |
196 | btrfs_mark_buffer_dirty(leaf); | 196 | btrfs_mark_buffer_dirty(leaf); |
@@ -422,10 +422,10 @@ again: | |||
422 | * sending it down to disk | 422 | * sending it down to disk |
423 | */ | 423 | */ |
424 | if (offset) { | 424 | if (offset) { |
425 | kaddr = kmap_atomic(page, KM_USER0); | 425 | kaddr = kmap_atomic(page); |
426 | memset(kaddr + offset, 0, | 426 | memset(kaddr + offset, 0, |
427 | PAGE_CACHE_SIZE - offset); | 427 | PAGE_CACHE_SIZE - offset); |
428 | kunmap_atomic(kaddr, KM_USER0); | 428 | kunmap_atomic(kaddr); |
429 | } | 429 | } |
430 | will_compress = 1; | 430 | will_compress = 1; |
431 | } | 431 | } |
@@ -1873,7 +1873,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end, | |||
1873 | } else { | 1873 | } else { |
1874 | ret = get_state_private(io_tree, start, &private); | 1874 | ret = get_state_private(io_tree, start, &private); |
1875 | } | 1875 | } |
1876 | kaddr = kmap_atomic(page, KM_USER0); | 1876 | kaddr = kmap_atomic(page); |
1877 | if (ret) | 1877 | if (ret) |
1878 | goto zeroit; | 1878 | goto zeroit; |
1879 | 1879 | ||
@@ -1882,7 +1882,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end, | |||
1882 | if (csum != private) | 1882 | if (csum != private) |
1883 | goto zeroit; | 1883 | goto zeroit; |
1884 | 1884 | ||
1885 | kunmap_atomic(kaddr, KM_USER0); | 1885 | kunmap_atomic(kaddr); |
1886 | good: | 1886 | good: |
1887 | return 0; | 1887 | return 0; |
1888 | 1888 | ||
@@ -1894,7 +1894,7 @@ zeroit: | |||
1894 | (unsigned long long)private); | 1894 | (unsigned long long)private); |
1895 | memset(kaddr + offset, 1, end - start + 1); | 1895 | memset(kaddr + offset, 1, end - start + 1); |
1896 | flush_dcache_page(page); | 1896 | flush_dcache_page(page); |
1897 | kunmap_atomic(kaddr, KM_USER0); | 1897 | kunmap_atomic(kaddr); |
1898 | if (private == 0) | 1898 | if (private == 0) |
1899 | return 0; | 1899 | return 0; |
1900 | return -EIO; | 1900 | return -EIO; |
@@ -4937,12 +4937,12 @@ static noinline int uncompress_inline(struct btrfs_path *path, | |||
4937 | ret = btrfs_decompress(compress_type, tmp, page, | 4937 | ret = btrfs_decompress(compress_type, tmp, page, |
4938 | extent_offset, inline_size, max_size); | 4938 | extent_offset, inline_size, max_size); |
4939 | if (ret) { | 4939 | if (ret) { |
4940 | char *kaddr = kmap_atomic(page, KM_USER0); | 4940 | char *kaddr = kmap_atomic(page); |
4941 | unsigned long copy_size = min_t(u64, | 4941 | unsigned long copy_size = min_t(u64, |
4942 | PAGE_CACHE_SIZE - pg_offset, | 4942 | PAGE_CACHE_SIZE - pg_offset, |
4943 | max_size - extent_offset); | 4943 | max_size - extent_offset); |
4944 | memset(kaddr + pg_offset, 0, copy_size); | 4944 | memset(kaddr + pg_offset, 0, copy_size); |
4945 | kunmap_atomic(kaddr, KM_USER0); | 4945 | kunmap_atomic(kaddr); |
4946 | } | 4946 | } |
4947 | kfree(tmp); | 4947 | kfree(tmp); |
4948 | return 0; | 4948 | return 0; |
@@ -5719,11 +5719,11 @@ static void btrfs_endio_direct_read(struct bio *bio, int err) | |||
5719 | unsigned long flags; | 5719 | unsigned long flags; |
5720 | 5720 | ||
5721 | local_irq_save(flags); | 5721 | local_irq_save(flags); |
5722 | kaddr = kmap_atomic(page, KM_IRQ0); | 5722 | kaddr = kmap_atomic(page); |
5723 | csum = btrfs_csum_data(root, kaddr + bvec->bv_offset, | 5723 | csum = btrfs_csum_data(root, kaddr + bvec->bv_offset, |
5724 | csum, bvec->bv_len); | 5724 | csum, bvec->bv_len); |
5725 | btrfs_csum_final(csum, (char *)&csum); | 5725 | btrfs_csum_final(csum, (char *)&csum); |
5726 | kunmap_atomic(kaddr, KM_IRQ0); | 5726 | kunmap_atomic(kaddr); |
5727 | local_irq_restore(flags); | 5727 | local_irq_restore(flags); |
5728 | 5728 | ||
5729 | flush_dcache_page(bvec->bv_page); | 5729 | flush_dcache_page(bvec->bv_page); |
diff --git a/fs/btrfs/lzo.c b/fs/btrfs/lzo.c index a178f5ebea78..743b86fa4fcb 100644 --- a/fs/btrfs/lzo.c +++ b/fs/btrfs/lzo.c | |||
@@ -411,9 +411,9 @@ static int lzo_decompress(struct list_head *ws, unsigned char *data_in, | |||
411 | 411 | ||
412 | bytes = min_t(unsigned long, destlen, out_len - start_byte); | 412 | bytes = min_t(unsigned long, destlen, out_len - start_byte); |
413 | 413 | ||
414 | kaddr = kmap_atomic(dest_page, KM_USER0); | 414 | kaddr = kmap_atomic(dest_page); |
415 | memcpy(kaddr, workspace->buf + start_byte, bytes); | 415 | memcpy(kaddr, workspace->buf + start_byte, bytes); |
416 | kunmap_atomic(kaddr, KM_USER0); | 416 | kunmap_atomic(kaddr); |
417 | out: | 417 | out: |
418 | return ret; | 418 | return ret; |
419 | } | 419 | } |
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index abc0fbffa510..390e7102b0ff 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c | |||
@@ -591,7 +591,7 @@ static int scrub_fixup_check(struct scrub_bio *sbio, int ix) | |||
591 | u64 flags = sbio->spag[ix].flags; | 591 | u64 flags = sbio->spag[ix].flags; |
592 | 592 | ||
593 | page = sbio->bio->bi_io_vec[ix].bv_page; | 593 | page = sbio->bio->bi_io_vec[ix].bv_page; |
594 | buffer = kmap_atomic(page, KM_USER0); | 594 | buffer = kmap_atomic(page); |
595 | if (flags & BTRFS_EXTENT_FLAG_DATA) { | 595 | if (flags & BTRFS_EXTENT_FLAG_DATA) { |
596 | ret = scrub_checksum_data(sbio->sdev, | 596 | ret = scrub_checksum_data(sbio->sdev, |
597 | sbio->spag + ix, buffer); | 597 | sbio->spag + ix, buffer); |
@@ -603,7 +603,7 @@ static int scrub_fixup_check(struct scrub_bio *sbio, int ix) | |||
603 | } else { | 603 | } else { |
604 | WARN_ON(1); | 604 | WARN_ON(1); |
605 | } | 605 | } |
606 | kunmap_atomic(buffer, KM_USER0); | 606 | kunmap_atomic(buffer); |
607 | 607 | ||
608 | return ret; | 608 | return ret; |
609 | } | 609 | } |
@@ -792,7 +792,7 @@ static void scrub_checksum(struct btrfs_work *work) | |||
792 | } | 792 | } |
793 | for (i = 0; i < sbio->count; ++i) { | 793 | for (i = 0; i < sbio->count; ++i) { |
794 | page = sbio->bio->bi_io_vec[i].bv_page; | 794 | page = sbio->bio->bi_io_vec[i].bv_page; |
795 | buffer = kmap_atomic(page, KM_USER0); | 795 | buffer = kmap_atomic(page); |
796 | flags = sbio->spag[i].flags; | 796 | flags = sbio->spag[i].flags; |
797 | logical = sbio->logical + i * PAGE_SIZE; | 797 | logical = sbio->logical + i * PAGE_SIZE; |
798 | ret = 0; | 798 | ret = 0; |
@@ -807,7 +807,7 @@ static void scrub_checksum(struct btrfs_work *work) | |||
807 | } else { | 807 | } else { |
808 | WARN_ON(1); | 808 | WARN_ON(1); |
809 | } | 809 | } |
810 | kunmap_atomic(buffer, KM_USER0); | 810 | kunmap_atomic(buffer); |
811 | if (ret) { | 811 | if (ret) { |
812 | ret = scrub_recheck_error(sbio, i); | 812 | ret = scrub_recheck_error(sbio, i); |
813 | if (!ret) { | 813 | if (!ret) { |
diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c index faccd47c6c46..92c20654cc55 100644 --- a/fs/btrfs/zlib.c +++ b/fs/btrfs/zlib.c | |||
@@ -370,9 +370,9 @@ static int zlib_decompress(struct list_head *ws, unsigned char *data_in, | |||
370 | PAGE_CACHE_SIZE - buf_offset); | 370 | PAGE_CACHE_SIZE - buf_offset); |
371 | bytes = min(bytes, bytes_left); | 371 | bytes = min(bytes, bytes_left); |
372 | 372 | ||
373 | kaddr = kmap_atomic(dest_page, KM_USER0); | 373 | kaddr = kmap_atomic(dest_page); |
374 | memcpy(kaddr + pg_offset, workspace->buf + buf_offset, bytes); | 374 | memcpy(kaddr + pg_offset, workspace->buf + buf_offset, bytes); |
375 | kunmap_atomic(kaddr, KM_USER0); | 375 | kunmap_atomic(kaddr); |
376 | 376 | ||
377 | pg_offset += bytes; | 377 | pg_offset += bytes; |
378 | bytes_left -= bytes; | 378 | bytes_left -= bytes; |