summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-defrag.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2009-09-16 02:02:33 +0200
committerChris Mason <chris.mason@oracle.com>2009-09-16 02:20:17 +0200
commit6e74057c4686dc12ea767b4bdc50a63876056e1c (patch)
treee7c70b8e08ab9e5363be28bcbcc72348122ae6e4 /fs/btrfs/tree-defrag.c
parentBtrfs: fix worker thread double spin_lock_irq (diff)
downloadlinux-6e74057c4686dc12ea767b4bdc50a63876056e1c.tar.xz
linux-6e74057c4686dc12ea767b4bdc50a63876056e1c.zip
Btrfs: Fix async thread shutdown race
It was possible for an async worker thread to be selected to receive a new work item, but exit before the work item was actually placed into that thread's work list. This commit fixes the race by incrementing the num_pending counter earlier, and making sure to check the number of pending work items before a thread exits. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/tree-defrag.c')
0 files changed, 0 insertions, 0 deletions