Reproduce:
# btrfs subvolume sync /mnt/btrfs
Subvolume id 323 is gone
# echo $?
1
#
Reason:
wait_for_subvolume_cleaning() return !0 in right case, because
value of ret is set to "is subvolume clean" state before return.
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
static int wait_for_subvolume_cleaning(int fd, int count, u64 *ids,
int sleep_interval)
{
- int ret = 0;
+ int ret;
int remaining;
int i;
break;
sleep(sleep_interval);
}
+
+ ret = 0;
out:
return ret;
}