Skip to contentSkip to conversation

btrfs: Clean up dead code in root-tree

PATCH In review Christos Gkekas 2 participants 2 messages Sep 9, 2017 – Sep 11, 2017 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: Clean up dead code in root-tree

The value of variable 'can_recover' is never used after being set, thus it should be removed.

---
 fs/btrfs/root-tree.c | 4 ----
 1 file changed, 4 deletions(-)
fs/btrfs/root-tree.c +0 -4
index 95bcc3c..3338407 100644
@@ -226,10 +226,6 @@ int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info)
 	struct btrfs_root *root;
 	int err = 0;
 	int ret;
-	bool can_recover = true;
-
-	if (sb_rdonly(fs_info->sb))
-		can_recover = false;
 
 	path = btrfs_alloc_path();
 	if (!path)
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Christos Gkekas

The value of variable 'can_recover' is never used after being set, thus it should be removed.

Seems it has never been used since introduction in commit 68a7342c51c95042 .

Quoted 28 lines
---
 fs/btrfs/root-tree.c | 4 ----
 1 file changed, 4 deletions(-)
fs/btrfs/root-tree.c +0 -4
index 95bcc3c..3338407 100644
@@ -226,10 +226,6 @@ int btrfs_find_orphan_roots(struct btrfs_fs_info *fs_info)
 	struct btrfs_root *root;
 	int err = 0;
 	int ret;
-	bool can_recover = true;
-
-	if (sb_rdonly(fs_info->sb))
-		can_recover = false;
 
 	path = btrfs_alloc_path();
 	if (!path)
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html