kernel.patches/3.2.34/patches.suse/btrfs-8007-lock-and-disable-irq-during-space-alloc.patch

41 lines
1.1 KiB
Diff
Raw Normal View History

2012-11-24 17:08:51 +01:00
From e2049e28add8f8fbfa8680fcf5fc49fa3b713ceb Mon Sep 17 00:00:00 2001
From: David Sterba <dsterba@suse.cz>
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 <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
---
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