aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 0e1ca423e22d..02d802cdd59b 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -168,8 +168,10 @@ int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end)
168 int ret; 168 int ret;
169 struct btrfs_root *root = BTRFS_I(inode)->root; 169 struct btrfs_root *root = BTRFS_I(inode)->root;
170 u32 csum = ~(u32)0; 170 u32 csum = ~(u32)0;
171 unsigned long flags;
171 172
172 ret = get_state_private(em_tree, start, &private); 173 ret = get_state_private(em_tree, start, &private);
174 local_irq_save(flags);
173 kaddr = kmap_atomic(page, KM_IRQ0); 175 kaddr = kmap_atomic(page, KM_IRQ0);
174 if (ret) { 176 if (ret) {
175 goto zeroit; 177 goto zeroit;
@@ -180,6 +182,7 @@ int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end)
180 goto zeroit; 182 goto zeroit;
181 } 183 }
182 kunmap_atomic(kaddr, KM_IRQ0); 184 kunmap_atomic(kaddr, KM_IRQ0);
185 local_irq_restore(flags);
183 return 0; 186 return 0;
184 187
185zeroit: 188zeroit:
@@ -188,6 +191,7 @@ zeroit:
188 memset(kaddr + offset, 1, end - start + 1); 191 memset(kaddr + offset, 1, end - start + 1);
189 flush_dcache_page(page); 192 flush_dcache_page(page);
190 kunmap_atomic(kaddr, KM_IRQ0); 193 kunmap_atomic(kaddr, KM_IRQ0);
194 local_irq_restore(flags);
191 return 0; 195 return 0;
192} 196}
193 197