[CRIU] [PATCH] fs: Don't hide error from prepare_fs
Andrew Vagin
avagin at parallels.com
Mon Jun 9 06:31:23 PDT 2014
Acked-by: Andrew Vagin <avagin at parallels.com>
On Mon, Jun 09, 2014 at 04:50:05PM +0400, Pavel Emelyanov wrote:
> If fchroot() succeeds the further failures don't get
> noticed by caller.
>
> Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
> ---
> files.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/files.c b/files.c
> index 991d4a2..a8cd87f 100644
> --- a/files.c
> +++ b/files.c
> @@ -1020,7 +1020,7 @@ static int fchroot(int fd)
>
> int prepare_fs(int pid)
> {
> - int ifd, dd, ret = -1;
> + int ifd, dd, ret, err = -1;
> FsEntry *fe;
>
> ifd = open_image(CR_FD_FS, O_RSTR, pid);
> @@ -1069,13 +1069,13 @@ int prepare_fs(int pid)
> umask(fe->umask);
> }
>
> - ret = 0;
> + err = 0;
> err:
> fs_entry__free_unpacked(fe, NULL);
> out_i:
> close_safe(&ifd);
> out:
> - return ret;
> + return err;
> }
>
> int shared_fdt_prepare(struct pstree_item *item)
> --
> 1.8.4.2
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list