aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorJosef Bacik <[email protected]>2014-03-06 19:01:07 -0500
committerChris Mason <[email protected]>2014-03-20 17:15:27 -0700
commit3bbb24b20a8800158c33eca8564f432dd14d0bf3 (patch)
tree502204ad927a0b743a3c0649fd7a79d644f5f6bc /tools/perf/util/trace-event-scripting.c
parent573bfb72f7608eb7097d2dd036a714a6ab20cffe (diff)
Btrfs: fix deadlock with nested trans handles
Zach found this deadlock that would happen like this btrfs_end_transaction <- reduce trans->use_count to 0 btrfs_run_delayed_refs btrfs_cow_block find_free_extent btrfs_start_transaction <- increase trans->use_count to 1 allocate chunk btrfs_end_transaction <- decrease trans->use_count to 0 btrfs_run_delayed_refs lock tree block we are cowing above ^^ We need to only decrease trans->use_count if it is above 1, otherwise leave it alone. This will make nested trans be the only ones who decrease their added ref, and will let us get rid of the trans->use_count++ hack if we have to commit the transaction. Thanks, cc: [email protected] Reported-by: Zach Brown <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Tested-by: Zach Brown <[email protected]> Signed-off-by: Chris Mason <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions