https://github.com/torvalds/linux
Revision ea4ebde02e08558b020c4b61bb9a4c0fcf63028e authored by Chris Mason on 19 June 2014, 21:16:52 UTC, committed by Chris Mason on 19 June 2014, 21:19:55 UTC
The Btrfs tree trylock function is poorly named.  It always takes
the spinlock and backs off if the blocking lock is held.  This
can lead to surprising lockups because people expect it to really be a
trylock.

This commit makes it a pure trylock, both for the spinlock and the
blocking lock.  It also reworks the nested lock handling slightly to
avoid taking the read lock while a spinning write lock might be held.

Signed-off-by: Chris Mason <clm@fb.com>
1 parent 47a306a
History
Tip revision: ea4ebde02e08558b020c4b61bb9a4c0fcf63028e authored by Chris Mason on 19 June 2014, 21:16:52 UTC
Btrfs: fix deadlocks with trylock on tree nodes
Tip revision: ea4ebde
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1.1 KB
.mailmap -rw-r--r-- 4.4 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 93.6 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 272.1 KB
Makefile -rw-r--r-- 50.5 KB
README -rw-r--r-- 18.3 KB
REPORTING-BUGS -rw-r--r-- 7.3 KB

README

back to top