Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[~shefty/rdma-dev.git] / fs / btrfs / inode.c
index 1be31368e881a2c88f2b4ea1f96373bfdaa19786..115bc05e42b06fee05ef7551cef1ad4174557634 100644 (file)
@@ -172,9 +172,9 @@ static noinline int insert_inline_extent(struct btrfs_trans_handle *trans,
                        cur_size = min_t(unsigned long, compressed_size,
                                       PAGE_CACHE_SIZE);
 
-                       kaddr = kmap_atomic(cpage, KM_USER0);
+                       kaddr = kmap_atomic(cpage);
                        write_extent_buffer(leaf, kaddr, ptr, cur_size);
-                       kunmap_atomic(kaddr, KM_USER0);
+                       kunmap_atomic(kaddr);
 
                        i++;
                        ptr += cur_size;
@@ -186,10 +186,10 @@ static noinline int insert_inline_extent(struct btrfs_trans_handle *trans,
                page = find_get_page(inode->i_mapping,
                                     start >> PAGE_CACHE_SHIFT);
                btrfs_set_file_extent_compression(leaf, ei, 0);
-               kaddr = kmap_atomic(page, KM_USER0);
+               kaddr = kmap_atomic(page);
                offset = start & (PAGE_CACHE_SIZE - 1);
                write_extent_buffer(leaf, kaddr + offset, ptr, size);
-               kunmap_atomic(kaddr, KM_USER0);
+               kunmap_atomic(kaddr);
                page_cache_release(page);
        }
        btrfs_mark_buffer_dirty(leaf);
@@ -426,10 +426,10 @@ again:
                         * sending it down to disk
                         */
                        if (offset) {
-                               kaddr = kmap_atomic(page, KM_USER0);
+                               kaddr = kmap_atomic(page);
                                memset(kaddr + offset, 0,
                                       PAGE_CACHE_SIZE - offset);
-                               kunmap_atomic(kaddr, KM_USER0);
+                               kunmap_atomic(kaddr);
                        }
                        will_compress = 1;
                }
@@ -1979,7 +1979,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end,
        } else {
                ret = get_state_private(io_tree, start, &private);
        }
-       kaddr = kmap_atomic(page, KM_USER0);
+       kaddr = kmap_atomic(page);
        if (ret)
                goto zeroit;
 
@@ -1988,7 +1988,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end,
        if (csum != private)
                goto zeroit;
 
-       kunmap_atomic(kaddr, KM_USER0);
+       kunmap_atomic(kaddr);
 good:
        return 0;
 
@@ -2000,7 +2000,7 @@ zeroit:
                       (unsigned long long)private);
        memset(kaddr + offset, 1, end - start + 1);
        flush_dcache_page(page);
-       kunmap_atomic(kaddr, KM_USER0);
+       kunmap_atomic(kaddr);
        if (private == 0)
                return 0;
        return -EIO;
@@ -5097,12 +5097,12 @@ static noinline int uncompress_inline(struct btrfs_path *path,
        ret = btrfs_decompress(compress_type, tmp, page,
                               extent_offset, inline_size, max_size);
        if (ret) {
-               char *kaddr = kmap_atomic(page, KM_USER0);
+               char *kaddr = kmap_atomic(page);
                unsigned long copy_size = min_t(u64,
                                  PAGE_CACHE_SIZE - pg_offset,
                                  max_size - extent_offset);
                memset(kaddr + pg_offset, 0, copy_size);
-               kunmap_atomic(kaddr, KM_USER0);
+               kunmap_atomic(kaddr);
        }
        kfree(tmp);
        return 0;
@@ -5880,11 +5880,11 @@ static void btrfs_endio_direct_read(struct bio *bio, int err)
                        unsigned long flags;
 
                        local_irq_save(flags);
-                       kaddr = kmap_atomic(page, KM_IRQ0);
+                       kaddr = kmap_atomic(page);
                        csum = btrfs_csum_data(root, kaddr + bvec->bv_offset,
                                               csum, bvec->bv_len);
                        btrfs_csum_final(csum, (char *)&csum);
-                       kunmap_atomic(kaddr, KM_IRQ0);
+                       kunmap_atomic(kaddr);
                        local_irq_restore(flags);
 
                        flush_dcache_page(bvec->bv_page);