summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2018-10-26 16:26:40 -0400
committerDavid Sterba <dsterba@suse.com>2018-12-17 08:51:25 -0500
commitce02f0326680562a905216d6601c8ac5020feaba (patch)
treeb70d7251658885c177bc1ae81cbba82a5f36ade4 /fs/btrfs/tree-log.c
parent7566ec393f4161572ba6f11ad5171fd5d59b0fbd (diff)
Btrfs: remove no longer used logged range variables when logging extents
The logged_start and logged_end variables, at btrfs_log_changed_extents, were added in commit 8c6c592831a0 ("btrfs: log csums for all modified extents"). However since the recent simplification for fsync, which makes us wait for all ordered extents to complete before logging extents, we no longer need those variables. Commit a2120a473a80 ("btrfs: clean up the left over logged_list usage") forgot to remove them. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index a5ce99a6c936..aa4bc4845ef0 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -4383,7 +4383,6 @@ static int btrfs_log_changed_extents(struct btrfs_trans_handle *trans,
4383 struct extent_map *em, *n; 4383 struct extent_map *em, *n;
4384 struct list_head extents; 4384 struct list_head extents;
4385 struct extent_map_tree *tree = &inode->extent_tree; 4385 struct extent_map_tree *tree = &inode->extent_tree;
4386 u64 logged_start, logged_end;
4387 u64 test_gen; 4386 u64 test_gen;
4388 int ret = 0; 4387 int ret = 0;
4389 int num = 0; 4388 int num = 0;
@@ -4392,8 +4391,6 @@ static int btrfs_log_changed_extents(struct btrfs_trans_handle *trans,
4392 4391
4393 write_lock(&tree->lock); 4392 write_lock(&tree->lock);
4394 test_gen = root->fs_info->last_trans_committed; 4393 test_gen = root->fs_info->last_trans_committed;
4395 logged_start = start;
4396 logged_end = end;
4397 4394
4398 list_for_each_entry_safe(em, n, &tree->modified_extents, list) { 4395 list_for_each_entry_safe(em, n, &tree->modified_extents, list) {
4399 /* 4396 /*
@@ -4434,11 +4431,6 @@ static int btrfs_log_changed_extents(struct btrfs_trans_handle *trans,
4434 em->start >= i_size_read(&inode->vfs_inode)) 4431 em->start >= i_size_read(&inode->vfs_inode))
4435 continue; 4432 continue;
4436 4433
4437 if (em->start < logged_start)
4438 logged_start = em->start;
4439 if ((em->start + em->len - 1) > logged_end)
4440 logged_end = em->start + em->len - 1;
4441
4442 /* Need a ref to keep it from getting evicted from cache */ 4434 /* Need a ref to keep it from getting evicted from cache */
4443 refcount_inc(&em->refs); 4435 refcount_inc(&em->refs);
4444 set_bit(EXTENT_FLAG_LOGGING, &em->flags); 4436 set_bit(EXTENT_FLAG_LOGGING, &em->flags);