]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Btrfs: Handle transid == 0 while opening devices
authorChris Mason <chris.mason@oracle.com>
Fri, 16 May 2008 17:14:57 +0000 (13:14 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:03 +0000 (11:04 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/volumes.c

index 501d23d3ebfd2f0c0a23ad4672af2d445a9391a7..3fbf0834e88474d168e59fce51bb3076b55674ab 100644 (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;