[CRIU] Re: [PATCH cr 03/11] restore: split read_and_open_vmas into
parts read_vmas and open_vmas
Andrew Vagin
avagin at parallels.com
Mon Oct 15 13:53:31 EDT 2012
On Mon, Oct 15, 2012 at 08:19:04PM +0400, Pavel Emelyanov wrote:
> > @@ -229,7 +244,7 @@ static int read_and_open_vmas(int pid, struct list_head *vmas, int *nr_vmas)
> > }
> >
> > close(fd);
> > - return ret;
> > + return ret < 0 ? -1 : 0;
>
> Mmm.. What for?
ret can be a file descriptor
ret = get_filemap_fd(pid, &vma->vma);
>
> > }
> >
> > static int prepare_and_sigreturn(int pid, CoreEntry *core)
>
> > @@ -335,7 +354,7 @@ static int restore_one_alive_task(int pid, CoreEntry *core)
> > * We should be sure, that children don't use any file
> > * descriptor while fdtable is being restored.
> > */
> > - list_for_each_entry(child, ¤t->children, list) {
> > + list_for_each_entry(child, ¤t->children, sibling) {
>
> What the heck is that?
Sorry, it's part of another patch.
>
> > if (!shared_fdtable(child))
> > continue;
> > futex_wait_until(child->rst->fdt_lock, FDT_LOCK_SYNC);
> >
>
>
More information about the CRIU
mailing list