btrfs-progs: subvol sync: fix reversed condition
authorDavid Sterba <dsterba@suse.com>
Tue, 6 Oct 2015 09:32:16 +0000 (11:32 +0200)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2015 10:13:47 +0000 (12:13 +0200)
In my local change to 07cc891d1d9819d5cf0628af555e7727d289cf7b
("btrfs-progs: Simplify all-subvolumn-clean condition for
wait_for_subvolume_cleaning") that reversed the meaning of the variable
dirty -> clean, I made a mistake and broke 'subvol sync' that will not
wait as expected and ends prematurely. Zhao Lei's original patch worked.

CC: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-subvolume.c

index 82173c0489a9656e107a5162058bcc3e24fbe4ea..c40330a324670a14799046525160dcbebb4493e0 100644 (file)
@@ -89,7 +89,7 @@ static int wait_for_subvolume_cleaning(int fd, int count, u64 *ids,
                                clean = 0;
                        }
                }
-               if (clean == 0)
+               if (clean)
                        break;
                sleep(sleep_interval);
        }