diff options
author | Chris Mason <chris.mason@oracle.com> | 2009-01-07 09:48:51 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-01-07 09:48:51 -0500 |
commit | 9ab86c8e01c3f298dba0cbf2502c635b7f6fc6f9 (patch) | |
tree | 4404dc71b5987f240fa8e59d24586304d04d8810 /fs | |
parent | cc7172defcf253335b16cf703fe4ac1ade15e1b1 (diff) | |
download | op-kernel-dev-9ab86c8e01c3f298dba0cbf2502c635b7f6fc6f9.zip op-kernel-dev-9ab86c8e01c3f298dba0cbf2502c635b7f6fc6f9.tar.gz |
Btrfs: kmap_atomic(KM_USER0) is safe for btrfs_readpage_end_io_hook
None of the checksum verification code schedules, so we can use the faster
kmap_atomic
Signed-off-by: Chris Mason <chris.mason@oracle.com>
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 cdb7011..8adfe05 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, } else { ret = get_state_private(io_tree, start, &private); } - kaddr = kmap(page); + kaddr = kmap_atomic(page, KM_USER0); if (ret) goto zeroit; @@ -1757,7 +1757,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end, if (csum != private) goto zeroit; - kunmap(page); + kunmap_atomic(kaddr, KM_USER0); good: /* if the io failure tree for this inode is non-empty, * check to see if we've recovered from a failed IO @@ -1772,7 +1772,7 @@ zeroit: (unsigned long long)private); memset(kaddr + offset, 1, end - start + 1); flush_dcache_page(page); - kunmap(page); + kunmap_atomic(kaddr, KM_USER0); if (private == 0) return 0; return -EIO; |