aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/ctree.c16
-rw-r--r--fs/btrfs/ctree.h2
-rw-r--r--fs/btrfs/disk-io.c2
-rw-r--r--fs/btrfs/root-tree.c4
-rw-r--r--fs/btrfs/send.c8
5 files changed, 16 insertions, 16 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 5c2cf992e717..01efcbc80dfb 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -5114,13 +5114,13 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
5114 right_path->search_commit_root = 1; 5114 right_path->search_commit_root = 1;
5115 right_path->skip_locking = 1; 5115 right_path->skip_locking = 1;
5116 5116
5117 spin_lock(&left_root->root_times_lock); 5117 spin_lock(&left_root->root_item_lock);
5118 left_start_ctransid = btrfs_root_ctransid(&left_root->root_item); 5118 left_start_ctransid = btrfs_root_ctransid(&left_root->root_item);
5119 spin_unlock(&left_root->root_times_lock); 5119 spin_unlock(&left_root->root_item_lock);
5120 5120
5121 spin_lock(&right_root->root_times_lock); 5121 spin_lock(&right_root->root_item_lock);
5122 right_start_ctransid = btrfs_root_ctransid(&right_root->root_item); 5122 right_start_ctransid = btrfs_root_ctransid(&right_root->root_item);
5123 spin_unlock(&right_root->root_times_lock); 5123 spin_unlock(&right_root->root_item_lock);
5124 5124
5125 trans = btrfs_join_transaction(left_root); 5125 trans = btrfs_join_transaction(left_root);
5126 if (IS_ERR(trans)) { 5126 if (IS_ERR(trans)) {
@@ -5215,15 +5215,15 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
5215 goto out; 5215 goto out;
5216 } 5216 }
5217 5217
5218 spin_lock(&left_root->root_times_lock); 5218 spin_lock(&left_root->root_item_lock);
5219 ctransid = btrfs_root_ctransid(&left_root->root_item); 5219 ctransid = btrfs_root_ctransid(&left_root->root_item);
5220 spin_unlock(&left_root->root_times_lock); 5220 spin_unlock(&left_root->root_item_lock);
5221 if (ctransid != left_start_ctransid) 5221 if (ctransid != left_start_ctransid)
5222 left_start_ctransid = 0; 5222 left_start_ctransid = 0;
5223 5223
5224 spin_lock(&right_root->root_times_lock); 5224 spin_lock(&right_root->root_item_lock);
5225 ctransid = btrfs_root_ctransid(&right_root->root_item); 5225 ctransid = btrfs_root_ctransid(&right_root->root_item);
5226 spin_unlock(&right_root->root_times_lock); 5226 spin_unlock(&right_root->root_item_lock);
5227 if (ctransid != right_start_ctransid) 5227 if (ctransid != right_start_ctransid)
5228 right_start_ctransid = 0; 5228 right_start_ctransid = 0;
5229 5229
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 6ba56aea5b62..313a6adfde55 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1645,7 +1645,7 @@ struct btrfs_root {
1645 1645
1646 int force_cow; 1646 int force_cow;
1647 1647
1648 spinlock_t root_times_lock; 1648 spinlock_t root_item_lock;
1649}; 1649};
1650 1650
1651struct btrfs_ioctl_defrag_range_args { 1651struct btrfs_ioctl_defrag_range_args {
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 3229531af8c3..faf182691b40 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1204,7 +1204,7 @@ static void __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
1204 root->root_key.objectid = objectid; 1204 root->root_key.objectid = objectid;
1205 root->anon_dev = 0; 1205 root->anon_dev = 0;
1206 1206
1207 spin_lock_init(&root->root_times_lock); 1207 spin_lock_init(&root->root_item_lock);
1208} 1208}
1209 1209
1210static int __must_check find_and_setup_root(struct btrfs_root *tree_root, 1210static int __must_check find_and_setup_root(struct btrfs_root *tree_root,
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c
index eb923d087da7..668af537a3ea 100644
--- a/fs/btrfs/root-tree.c
+++ b/fs/btrfs/root-tree.c
@@ -548,9 +548,9 @@ void btrfs_update_root_times(struct btrfs_trans_handle *trans,
548 struct btrfs_root_item *item = &root->root_item; 548 struct btrfs_root_item *item = &root->root_item;
549 struct timespec ct = CURRENT_TIME; 549 struct timespec ct = CURRENT_TIME;
550 550
551 spin_lock(&root->root_times_lock); 551 spin_lock(&root->root_item_lock);
552 item->ctransid = cpu_to_le64(trans->transid); 552 item->ctransid = cpu_to_le64(trans->transid);
553 item->ctime.sec = cpu_to_le64(ct.tv_sec); 553 item->ctime.sec = cpu_to_le64(ct.tv_sec);
554 item->ctime.nsec = cpu_to_le32(ct.tv_nsec); 554 item->ctime.nsec = cpu_to_le32(ct.tv_nsec);
555 spin_unlock(&root->root_times_lock); 555 spin_unlock(&root->root_item_lock);
556} 556}
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index e78b297b0b00..54454542ad40 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -4397,9 +4397,9 @@ static int full_send_tree(struct send_ctx *sctx)
4397 if (!path) 4397 if (!path)
4398 return -ENOMEM; 4398 return -ENOMEM;
4399 4399
4400 spin_lock(&send_root->root_times_lock); 4400 spin_lock(&send_root->root_item_lock);
4401 start_ctransid = btrfs_root_ctransid(&send_root->root_item); 4401 start_ctransid = btrfs_root_ctransid(&send_root->root_item);
4402 spin_unlock(&send_root->root_times_lock); 4402 spin_unlock(&send_root->root_item_lock);
4403 4403
4404 key.objectid = BTRFS_FIRST_FREE_OBJECTID; 4404 key.objectid = BTRFS_FIRST_FREE_OBJECTID;
4405 key.type = BTRFS_INODE_ITEM_KEY; 4405 key.type = BTRFS_INODE_ITEM_KEY;
@@ -4422,9 +4422,9 @@ join_trans:
4422 * Make sure the tree has not changed after re-joining. We detect this 4422 * Make sure the tree has not changed after re-joining. We detect this
4423 * by comparing start_ctransid and ctransid. They should always match. 4423 * by comparing start_ctransid and ctransid. They should always match.
4424 */ 4424 */
4425 spin_lock(&send_root->root_times_lock); 4425 spin_lock(&send_root->root_item_lock);
4426 ctransid = btrfs_root_ctransid(&send_root->root_item); 4426 ctransid = btrfs_root_ctransid(&send_root->root_item);
4427 spin_unlock(&send_root->root_times_lock); 4427 spin_unlock(&send_root->root_item_lock);
4428 4428
4429 if (ctransid != start_ctransid) { 4429 if (ctransid != start_ctransid) {
4430 WARN(1, KERN_WARNING "btrfs: the root that you're trying to " 4430 WARN(1, KERN_WARNING "btrfs: the root that you're trying to "