]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: hold the commit_root_sem when getting the commit root during send
authorJosef Bacik <jbacik@fb.com>
Fri, 28 Mar 2014 21:16:01 +0000 (17:16 -0400)
committerChris Mason <clm@fb.com>
Mon, 7 Apr 2014 16:08:39 +0000 (09:08 -0700)
commit4b6f5e644e7f549e56f0a144a457992ed718a35c
tree266eeb3baf38b968ae2186575ae70ef431cf159f
parent836e0bf2c9f3fdfae2f8a446078217ee3337c583
Btrfs: hold the commit_root_sem when getting the commit root during send

We currently rely too heavily on roots being read-only to save us from just
accessing root->commit_root.  We can easily balance blocks out from underneath a
read only root, so to save us from getting screwed make sure we only access
root->commit_root under the commit root sem.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/send.c