aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sccnxp.c
diff options
context:
space:
mode:
authorChris Mason <[email protected]>2014-11-19 18:25:09 +0000
committerChris Mason <[email protected]>2014-11-19 18:34:35 +0000
commitf82c458a2c3ffb94b431fc6ad791a79df1b3713e (patch)
tree0eca3f95f74d1cde140366002b3cd794ce96f67c /drivers/tty/serial/sccnxp.c
parentBtrfs: fix kfree on list_head in btrfs_lookup_csums_range error cleanup (diff)
downloadkernel-f82c458a2c3ffb94b431fc6ad791a79df1b3713e.tar.gz
kernel-f82c458a2c3ffb94b431fc6ad791a79df1b3713e.zip
btrfs: fix lockups from btrfs_clear_path_blocking
The fair reader/writer locks mean that btrfs_clear_path_blocking needs to strictly follow lock ordering rules even when we already have blocking locks on a given path. Before we can clear a blocking lock on the path, we need to make sure all of the locks have been converted to blocking. This will remove lock inversions against anyone spinning in write_lock() against the buffers we're trying to get read locks on. These inversions didn't exist before the fair read/writer locks, but now we need to be more careful. We papered over this deadlock in the past by changing btrfs_try_read_lock() to be a true trylock against both the spinlock and the blocking lock. This was slower, and not sufficient to fix all the deadlocks. This patch adds a btrfs_tree_read_lock_atomic(), which basically means get the spinlock but trylock on the blocking lock. Signed-off-by: Chris Mason <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Reported-by: Patrick Schmid <[email protected]> cc: [email protected] #v3.15+
Diffstat (limited to 'drivers/tty/serial/sccnxp.c')
0 files changed, 0 insertions, 0 deletions