Btrfs: fix check on same raid type flag twice
authorHenrik Nordvik <henrikno@gmail.com>
Mon, 29 Apr 2013 18:09:23 +0000 (18:09 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Fri, 14 Jun 2013 15:29:14 +0000 (11:29 -0400)
Code checked for raid 5 flag in two else-if branches, so code would never be reached. Probably a copy-paste bug.

Signed-off-by: Henrik Nordvik <henrikno@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/disk-io.c

index b8b60b660c8f833cb38bf93823e1a3738e32669a..aecf788ed81e39c06c3daca6aac87ef74839fc64 100644 (file)
@@ -3258,7 +3258,7 @@ int btrfs_calc_num_tolerated_disk_barrier_failures(
                                            BTRFS_BLOCK_GROUP_RAID10)) {
                                                num_tolerated_disk_barrier_failures = 1;
                                        } else if (flags &
-                                                  BTRFS_BLOCK_GROUP_RAID5) {
+                                                  BTRFS_BLOCK_GROUP_RAID6) {
                                                num_tolerated_disk_barrier_failures = 2;
                                        }
                                }