summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-01-06 13:26:40 -0500
committerChris Mason <chris.mason@oracle.com>2009-01-06 13:26:40 -0500
commitcc7172defcf253335b16cf703fe4ac1ade15e1b1 (patch)
tree995f5404304502a0cb13f5fd4b7be24e42f19244 /fs
parent07d400a6df4767a90d49a153fdb7f4cfa1e3f23e (diff)
downloadblackbird-op-linux-cc7172defcf253335b16cf703fe4ac1ade15e1b1.tar.gz
blackbird-op-linux-cc7172defcf253335b16cf703fe4ac1ade15e1b1.zip
Btrfs: Don't use kmap_atomic(..., KM_IRQ0) during checksum verifies
Checksum verification happens in a helper thread, and there is no need to mess with interrupts. This switches to kmap() instead. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/inode.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 4e57fe68e4b9..cdb701165a05 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1727,7 +1727,6 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end,
int ret;
struct btrfs_root *root = BTRFS_I(inode)->root;
u32 csum = ~(u32)0;
- unsigned long flags;
if (PageChecked(page)) {
ClearPageChecked(page);
@@ -1749,8 +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);
}
- local_irq_save(flags);
- kaddr = kmap_atomic(page, KM_IRQ0);
+ kaddr = kmap(page);
if (ret)
goto zeroit;
@@ -1759,8 +1757,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end,
if (csum != private)
goto zeroit;
- kunmap_atomic(kaddr, KM_IRQ0);
- local_irq_restore(flags);
+ kunmap(page);
good:
/* if the io failure tree for this inode is non-empty,
* check to see if we've recovered from a failed IO
@@ -1775,8 +1772,7 @@ zeroit:
(unsigned long long)private);
memset(kaddr + offset, 1, end - start + 1);
flush_dcache_page(page);
- kunmap_atomic(kaddr, KM_IRQ0);
- local_irq_restore(flags);
+ kunmap(page);
if (private == 0)
return 0;
return -EIO;
OpenPOWER on IntegriCloud