From e2049e28add8f8fbfa8680fcf5fc49fa3b713ceb Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 22 Nov 2011 18:05:48 +0100 Patch-mainline: pending References: FATE#306586 bnc#730103 Subject: [PATCH] btrfs: lock and disable irq during space alloc This is a workaround. Signed-off-by: Jeff Mahoney Signed-off-by: David Sterba --- fs/btrfs/free-space-cache.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 7807276..e49c1cd 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -2102,7 +2102,7 @@ u64 btrfs_find_space_for_alloc(struct btrfs_block_group_cache *block_group, u64 bytes_search = bytes + empty_size; u64 ret = 0; - spin_lock(&ctl->tree_lock); + spin_lock_irq(&ctl->tree_lock); entry = find_free_space(ctl, &offset, &bytes_search); if (!entry) goto out; @@ -2123,7 +2123,7 @@ u64 btrfs_find_space_for_alloc(struct btrfs_block_group_cache *block_group, } out: - spin_unlock(&ctl->tree_lock); + spin_unlock_irq(&ctl->tree_lock); return ret; } -- 1.7.6