commit | 6e74057c4686dc12ea767b4bdc50a63876056e1c | [log] [tgz] |
---|---|---|
author | Chris Mason <chris.mason@oracle.com> | Tue Sep 15 20:02:33 2009 -0400 |
committer | Chris Mason <chris.mason@oracle.com> | Tue Sep 15 20:20:17 2009 -0400 |
tree | e7c70b8e08ab9e5363be28bcbcc72348122ae6e4 | |
parent | 627e421a3f35ad6b52dc58982fb6f8a97c30dcd7 [diff] |
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>