diff options
author | Chris Mason <chris.mason@oracle.com> | 2009-01-06 13:26:40 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-01-06 13:26:40 -0500 |
commit | cc7172defcf253335b16cf703fe4ac1ade15e1b1 (patch) | |
tree | 995f5404304502a0cb13f5fd4b7be24e42f19244 /fs/btrfs | |
parent | 07d400a6df4767a90d49a153fdb7f4cfa1e3f23e (diff) |
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/btrfs')
-rw-r--r-- | fs/btrfs/inode.c | 10 |
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, | |||
1727 | int ret; | 1727 | int ret; |
1728 | struct btrfs_root *root = BTRFS_I(inode)->root; | 1728 | struct btrfs_root *root = BTRFS_I(inode)->root; |
1729 | u32 csum = ~(u32)0; | 1729 | u32 csum = ~(u32)0; |
1730 | unsigned long flags; | ||
1731 | 1730 | ||
1732 | if (PageChecked(page)) { | 1731 | if (PageChecked(page)) { |
1733 | ClearPageChecked(page); | 1732 | ClearPageChecked(page); |
@@ -1749,8 +1748,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end, | |||
1749 | } else { | 1748 | } else { |
1750 | ret = get_state_private(io_tree, start, &private); | 1749 | ret = get_state_private(io_tree, start, &private); |
1751 | } | 1750 | } |
1752 | local_irq_save(flags); | 1751 | kaddr = kmap(page); |
1753 | kaddr = kmap_atomic(page, KM_IRQ0); | ||
1754 | if (ret) | 1752 | if (ret) |
1755 | goto zeroit; | 1753 | goto zeroit; |
1756 | 1754 | ||
@@ -1759,8 +1757,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end, | |||
1759 | if (csum != private) | 1757 | if (csum != private) |
1760 | goto zeroit; | 1758 | goto zeroit; |
1761 | 1759 | ||
1762 | kunmap_atomic(kaddr, KM_IRQ0); | 1760 | kunmap(page); |
1763 | local_irq_restore(flags); | ||
1764 | good: | 1761 | good: |
1765 | /* if the io failure tree for this inode is non-empty, | 1762 | /* if the io failure tree for this inode is non-empty, |
1766 | * check to see if we've recovered from a failed IO | 1763 | * check to see if we've recovered from a failed IO |
@@ -1775,8 +1772,7 @@ zeroit: | |||
1775 | (unsigned long long)private); | 1772 | (unsigned long long)private); |
1776 | memset(kaddr + offset, 1, end - start + 1); | 1773 | memset(kaddr + offset, 1, end - start + 1); |
1777 | flush_dcache_page(page); | 1774 | flush_dcache_page(page); |
1778 | kunmap_atomic(kaddr, KM_IRQ0); | 1775 | kunmap(page); |
1779 | local_irq_restore(flags); | ||
1780 | if (private == 0) | 1776 | if (private == 0) |
1781 | return 0; | 1777 | return 0; |
1782 | return -EIO; | 1778 | return -EIO; |