aboutsummaryrefslogtreecommitdiffstats
path: root/disk-io.c
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2016-05-02 11:13:20 -0700
committerDavid Sterba <dsterba@suse.com>2016-05-11 16:37:07 +0200
commit5c5a6227721a779389af3e7eb67b63f15c638eb9 (patch)
treeba4c1b84b0ba41bbff09dab963096eafa23cadf3 /disk-io.c
parent1e4abbdf96cae7cbf17a3bf1376d7a56e78153fa (diff)
downloadbtrfs-progs-5c5a6227721a779389af3e7eb67b63f15c638eb9.tar.gz
btrfs-progs-5c5a6227721a779389af3e7eb67b63f15c638eb9.tar.xz
btrfs-progs-5c5a6227721a779389af3e7eb67b63f15c638eb9.zip
btrfs-progs: fix incorrect flag check while recovering super
The flag OPEN_CTREE_RECOVER_SUPER is set when it's going to recover any bad superblock copy, the current code doesn't match that. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'disk-io.c')
-rw-r--r--disk-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-io.c b/disk-io.c
index f1d4697..b60c391 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -1262,7 +1262,7 @@ static struct btrfs_fs_info *__open_ctree_fd(int fp, const char *path,
goto out;
disk_super = fs_info->super_copy;
- if (!(flags & OPEN_CTREE_RECOVER_SUPER))
+ if (flags & OPEN_CTREE_RECOVER_SUPER)
ret = btrfs_read_dev_super(fs_devices->latest_bdev,
disk_super, sb_bytenr, 1);
else