btrfs-progs: add commit_root_sem to btrfs_fs_info
This is used in ctree.c around getting the old root, add this to our btrfs_fs_info to make it more straightforward to sync ctree.c into btrfs-progs. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
f7271ef547
commit
ec9cbf2f43
|
@ -329,6 +329,7 @@ struct btrfs_fs_info {
|
|||
struct extent_io_tree *excluded_extents;
|
||||
|
||||
spinlock_t trans_lock;
|
||||
struct rw_semaphore commit_root_sem;
|
||||
|
||||
struct rb_root block_group_cache_tree;
|
||||
/* logical->physical extent mapping */
|
||||
|
|
|
@ -879,6 +879,7 @@ struct btrfs_fs_info *btrfs_new_fs_info(int writable, u64 sb_bytenr)
|
|||
INIT_LIST_HEAD(&fs_info->recow_ebs);
|
||||
|
||||
spin_lock_init(&fs_info->trans_lock);
|
||||
init_rwsem(&fs_info->commit_root_sem);
|
||||
|
||||
if (!writable)
|
||||
fs_info->readonly = 1;
|
||||
|
|
Loading…
Reference in New Issue