提交 59d169e2 编写于 作者: C Chris Mason

Btrfs: Fix read/write_extent_buffer to use KM_USER1 instead of KM_USER0

This avoids recursive use of KM_USER0 during btrfs_file_write
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 b4a2a0ed
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册