mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
mount: fix double-dump file system bug
In the function dump_one_fs(), there's a comment that says "mnt_bind is a cycled list, so list_for_each can't be used here." That means that the list head of the list is also a node of the list. The subsequent list_for_each_entry() marks all the mount info nodes as dumped, except it skips the list head, which is also a mount info. This is the bug we fix. This bug made CRIU dump a file system twice. See https://github.com/checkpoint-restore/criu-image-streamer/issues/8 Signed-off-by: Nicolas Viennot <Nicolas.Viennot@twosigma.com>
This commit is contained in:
committed by
Andrei Vagin
parent
bea9580e3c
commit
0b2a7223bb
@@ -1549,6 +1549,7 @@ static int dump_one_fs(struct mount_info *mi)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
pm->dumped = true;
|
||||
list_for_each_entry(t, &pm->mnt_bind, mnt_bind)
|
||||
t->dumped = true;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user