]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix race when updating existing ref head
authorFilipe Manana <fdmanana@gmail.com>
Fri, 14 Mar 2014 20:55:01 +0000 (20:55 +0000)
committerChris Mason <clm@fb.com>
Fri, 21 Mar 2014 00:15:28 +0000 (17:15 -0700)
commit2370a6dbb20e607ed78e6e1cfa8daaa7bcfd0338
tree4ce8aee02deb8ed2d37ef08fe7b2bf2ef66eec24
parentac0d32c2ae77ca821869a6639f91a68c284c6ed8
Btrfs: fix race when updating existing ref head

While we update an existing ref head's extent_op, we're not holding
its spinlock, so while we're updating its extent_op contents (key,
flags) we can have a task running __btrfs_run_delayed_refs() that
holds the ref head's lock and sets its extent_op to NULL right after
the task updating the ref head just checked its extent_op was not NULL.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/delayed-ref.c