metadump_v2 is initialized to 0 and never updated again. So remove the
deadcode.

Signed-off-by: Eryu Guan <[email protected]>
---

I'm not sure about this one, seems metadump_v2 should be initialized depending
on whether superblock has BTRFS_SUPER_FLAG_METADUMP_V2 flag set.

 cmds-check.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/cmds-check.c b/cmds-check.c
index 80a7c29..118a274 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -7597,7 +7597,6 @@ static int check_chunk_refs(struct chunk_record 
*chunk_rec,
        u64 devid;
        u64 offset;
        u64 length;
-       int metadump_v2 = 0;
        int i;
        int ret = 0;
 
@@ -7610,8 +7609,7 @@ static int check_chunk_refs(struct chunk_record 
*chunk_rec,
                                               cache);
                if (chunk_rec->length != block_group_rec->offset ||
                    chunk_rec->offset != block_group_rec->objectid ||
-                   (!metadump_v2 &&
-                    chunk_rec->type_flags != block_group_rec->flags)) {
+                   chunk_rec->type_flags != block_group_rec->flags) {
                        if (!silent)
                                fprintf(stderr,
                                        "Chunk[%llu, %u, %llu]: length(%llu), 
offset(%llu), type(%llu) mismatch with block group[%llu, %u, %llu]: 
offset(%llu), objectid(%llu), flags(%llu)\n",
@@ -7645,9 +7643,6 @@ static int check_chunk_refs(struct chunk_record 
*chunk_rec,
                ret = 1;
        }
 
-       if (metadump_v2)
-               return ret;
-
        length = calc_stripe_length(chunk_rec->type_flags, chunk_rec->length,
                                    chunk_rec->num_stripes);
        for (i = 0; i < chunk_rec->num_stripes; ++i) {
-- 
2.4.3

--
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

Reply via email to