mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
Btrfs: Handle transid == 0 while opening devices
Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
1c8cfcc159
commit
6af5ac3c1a
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue