Btrfs: Handle transid == 0 while opening devices

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason 2008-05-16 13:14:57 -04:00
parent 1c8cfcc159
commit 6af5ac3c1a

View File

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