[RFC v4][PATCH 9/9] File descriprtors (restore)

Dave Hansen dave at linux.vnet.ibm.com
Tue Sep 9 09:26:20 PDT 2008


On Tue, 2008-09-09 at 03:42 -0400, Oren Laadan wrote:
> 
> +static int cr_close_all_fds(struct files_struct *files)
> +{
> +       int *fdtable;
> +       int n;
> +
> +       do {
> +               n = cr_scan_fds(files, &fdtable);
> +               if (n < 0)
> +                       return n;
> +               while (n--)
> +                       sys_close(fdtable[n]);
> +               kfree(fdtable);
> +       } while (n != -1);
> +
> +       return 0;
> +}

This needs to use an ERR_PTR().  It will save using the double-pointer.

-- Dave



More information about the Containers mailing list