mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +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:
parent
bea9580e3c
commit
0b2a7223bb
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue