diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index cdb701165a05..8adfe059ab41 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -1748,7 +1748,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end, | |||
1748 | } else { | 1748 | } else { |
1749 | ret = get_state_private(io_tree, start, &private); | 1749 | ret = get_state_private(io_tree, start, &private); |
1750 | } | 1750 | } |
1751 | kaddr = kmap(page); | 1751 | kaddr = kmap_atomic(page, KM_USER0); |
1752 | if (ret) | 1752 | if (ret) |
1753 | goto zeroit; | 1753 | goto zeroit; |
1754 | 1754 | ||
@@ -1757,7 +1757,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end, | |||
1757 | if (csum != private) | 1757 | if (csum != private) |
1758 | goto zeroit; | 1758 | goto zeroit; |
1759 | 1759 | ||
1760 | kunmap(page); | 1760 | kunmap_atomic(kaddr, KM_USER0); |
1761 | good: | 1761 | good: |
1762 | /* if the io failure tree for this inode is non-empty, | 1762 | /* if the io failure tree for this inode is non-empty, |
1763 | * check to see if we've recovered from a failed IO | 1763 | * check to see if we've recovered from a failed IO |
@@ -1772,7 +1772,7 @@ zeroit: | |||
1772 | (unsigned long long)private); | 1772 | (unsigned long long)private); |
1773 | memset(kaddr + offset, 1, end - start + 1); | 1773 | memset(kaddr + offset, 1, end - start + 1); |
1774 | flush_dcache_page(page); | 1774 | flush_dcache_page(page); |
1775 | kunmap(page); | 1775 | kunmap_atomic(kaddr, KM_USER0); |
1776 | if (private == 0) | 1776 | if (private == 0) |
1777 | return 0; | 1777 | return 0; |
1778 | return -EIO; | 1778 | return -EIO; |