From a36333af3ce4acb958f34c4fa20dcd0150186828 Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Wed, 25 Jul 2012 15:57:13 -0400 Subject: [PATCH] --- yaml --- r: 318886 b: refs/heads/master c: e9fbcb42201c862fd6ab45c48ead4f47bb2dea9d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/btrfs/async-thread.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 990f8f1ac70d..a9fee2b6d655 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2b0ce2c2909368d124a78a88e5c7106fdcba6221 +refs/heads/master: e9fbcb42201c862fd6ab45c48ead4f47bb2dea9d diff --git a/trunk/fs/btrfs/async-thread.c b/trunk/fs/btrfs/async-thread.c index 42704149b723..58b7d14b08ee 100644 --- a/trunk/fs/btrfs/async-thread.c +++ b/trunk/fs/btrfs/async-thread.c @@ -206,10 +206,17 @@ static noinline void run_ordered_completions(struct btrfs_workers *workers, work->ordered_func(work); - /* now take the lock again and call the freeing code */ + /* now take the lock again and drop our item from the list */ spin_lock(&workers->order_lock); list_del(&work->order_list); + spin_unlock(&workers->order_lock); + + /* + * we don't want to call the ordered free functions + * with the lock held though + */ work->ordered_free(work); + spin_lock(&workers->order_lock); } spin_unlock(&workers->order_lock);