From: Chris Mason Date: Fri, 16 May 2008 17:14:57 +0000 (-0400) Subject: Btrfs: Handle transid == 0 while opening devices X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6af5ac3c1aede574acde5fc477f1a1c876fb568e;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Btrfs: Handle transid == 0 while opening devices Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 501d23d3ebfd..3fbf0834e884 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -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;