summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2014-03-28 17:16:01 -0400
committerChris Mason <clm@fb.com>2014-04-07 09:08:39 -0700
commit3f8a18cc53bd1be26eb5b5247e1386ad0e21b623 (patch)
tree266eeb3baf38b968ae2186575ae70ef431cf159f /fs/btrfs/ctree.h
parent9e351cc862b098d8ec8f8022d110932490794925 (diff)
downloadlinux-3f8a18cc53bd1be26eb5b5247e1386ad0e21b623.tar.bz2
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>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 4253ab257c9c..d8a669ed5506 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -609,6 +609,7 @@ struct btrfs_path {
unsigned int skip_locking:1;
unsigned int leave_spinning:1;
unsigned int search_commit_root:1;
+ unsigned int need_commit_sem:1;
};
/*