Commit 6af5ac3c authored by Chris Mason's avatar Chris Mason

Btrfs: Handle transid == 0 while opening devices

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 1c8cfcc1
......@@ -262,7 +262,7 @@ int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
goto error_brelse;
transid = btrfs_super_generation(disk_super);
if (transid > latest_transid) {
if (!latest_transid || transid > latest_transid) {
latest_devid = devid;
latest_transid = transid;
latest_bdev = bdev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment