Re: [PATCH v2 16/36] fs: add ksys_dup{,3}() helper; remove in-kernel calls to sys_dup{,3}()

From: Dominik Brodowski
Date: Sat Mar 17 2018 - 13:22:57 EST


On Fri, Mar 16, 2018 at 01:48:34AM -0700, Christoph Hellwig wrote:
> On Thu, Mar 15, 2018 at 08:05:09PM +0100, Dominik Brodowski wrote:
> > Using ksys_dup() and ksys_dup3() as helper functions allows us to
> > avoid the in-kernel calls to the sys_dup() and sys_dup3() syscalls.
>
> do_dup/dup3 or kern_dup/dup3, please.

On the naming issue, see my other message from a few days ago. Concerning
the added complexity and the need-for-cleanup in init/do_mounts_initrd.c
and init/main.c, I have added the following comment:

In the near future, the fs-external callers of ksys_dup{,3}() should be
converted to call do_dup2() directly. Then, ksys_dup{,3}() can be moved
within sys_dup{,3}() again.

Thanks,
Dominik