Btrfs: Fix read/write_extent_buffer to use KM_USER1 instead of KM_USER0
authorChris Mason <chris.mason@oracle.com>
Fri, 19 Oct 2007 13:23:09 +0000 (09:23 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:03:57 +0000 (11:03 -0400)
This avoids recursive use of KM_USER0 during btrfs_file_write

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent_map.c

index c0f834563cedb54f36958e72ddf973b70bbb99e6..3c81f5eab15565da045b16bd4784794686b329d6 100644 (file)
@@ -2378,9 +2378,9 @@ void read_extent_buffer(struct extent_buffer *eb, void *dstv,
                WARN_ON(!PageUptodate(page));
 
                cur = min(len, (PAGE_CACHE_SIZE - offset));
-               kaddr = kmap_atomic(page, KM_USER0);
+               kaddr = kmap_atomic(page, KM_USER1);
                memcpy(dst, kaddr + offset, cur);
-               kunmap_atomic(kaddr, KM_USER0);
+               kunmap_atomic(kaddr, KM_USER1);
 
                dst += cur;
                len -= cur;
@@ -2523,9 +2523,9 @@ void write_extent_buffer(struct extent_buffer *eb, const void *srcv,
                WARN_ON(!PageUptodate(page));
 
                cur = min(len, PAGE_CACHE_SIZE - offset);
-               kaddr = kmap_atomic(page, KM_USER0);
+               kaddr = kmap_atomic(page, KM_USER1);
                memcpy(kaddr + offset, src, cur);
-               kunmap_atomic(kaddr, KM_USER0);
+               kunmap_atomic(kaddr, KM_USER1);
 
                src += cur;
                len -= cur;