summaryrefslogtreecommitdiff
path: root/cmds-subvolume.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2015-10-06 11:32:16 +0200
committerDavid Sterba <dsterba@suse.com>2015-10-07 12:13:47 +0200
commitd3be5b65dab602104829379144b22426f6b08206 (patch)
treede83919820a3eb655d76de014925967f6a26ffbf /cmds-subvolume.c
parent4bdc7105428b9a372b15b03082c20909bc8ce6f0 (diff)
btrfs-progs: subvol sync: fix reversed condition
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>
Diffstat (limited to 'cmds-subvolume.c')
-rw-r--r--cmds-subvolume.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index 82173c0..c40330a 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -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);
}