aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2013-05-15 03:48:20 -0400
committerJosef Bacik <jbacik@fusionio.com>2013-06-14 11:29:38 -0400
commitb0feb9d96e71a88d7eec56f41b8f23e92af889b0 (patch)
treee808deeb4f3b33636d6481ff1bc88ae269880fa3 /fs/btrfs/ctree.h
parentcb517eabba4f109810dba2e5f37b0dcf22103065 (diff)
Btrfs: introduce grab/put functions for the root of the fs/file tree
The grab/put funtions will be used in the next patch, which need grab the root object and ensure it is not freed. We use reference counter instead of the srcu lock is to aovid blocking the memory reclaim task, which invokes synchronize_srcu(). Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.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 a84e59b7b006..91a8ca7af77e 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1746,6 +1746,7 @@ struct btrfs_root {
1746 int force_cow; 1746 int force_cow;
1747 1747
1748 spinlock_t root_item_lock; 1748 spinlock_t root_item_lock;
1749 atomic_t refs;
1749}; 1750};
1750 1751
1751struct btrfs_ioctl_defrag_range_args { 1752struct btrfs_ioctl_defrag_range_args {