Received: by 10.213.65.68 with SMTP id h4csp462380imn; Sat, 17 Mar 2018 10:25:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELs5BH9XzevUCqOS+FJ85bfBE9PmcTZ6RpUSktPjp99yYkRxxUQTxegk7Sm65DGYzatTacJv X-Received: by 2002:a17:902:5066:: with SMTP id f35-v6mr6423982plh.14.1521307538140; Sat, 17 Mar 2018 10:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521307538; cv=none; d=google.com; s=arc-20160816; b=xSXXdf6Y9plSNAk3piFCxRDSy3Etnz2DMQPxfRGyRJDk3BaM6sDhtUcyK69B+/RNJJ RMbo/TAOrlfK9PP7Jhk5+rWGde4kg89u8SJ1bdn+YxmrGSYQHXPZGCoYLsV8a0Us33g2 sjhINfDEt3Hg509dSeu1hv+3qkPh+PQ6w+2Kixhr0gZUXbSo/gxLKWybUv8K/wlqdmqs b/pC4LEaVqO5Iy2Yrtke9mILOunfXhDdnpJBkEbISHSw7cr5YrLF/g/t8PguC4xcCLI9 S0CQklhUenxGQ/X9VeoIKx9E+vu9Mb0zlwkvtfNQPfD2vkffC1FGR4tL0+fpqm492sGm cTDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=8obCt/klUTKsKq6GN/a7l1nr5bKhjW3/cRi+kISkhus=; b=S3vAplOBcc/ftSKvAFuEzlsh/BS6FE5NPnTSgvWYu3/Ewd6d4QAfRwLUQpzyLrPHif oCw1Ej6YDTCmRc8xPBeDkVmvuUAV24WxIY9gCo5jtLW8nKEfTD+KxXFdfPVdruifkNLB Ru6Tv8I3cCz4dRUeEQERW6bNamlGHk2BxIRAem0MBBT50H2rEM7VUQv+sKOul4rnmTSF jxhqiLLG69pc7Why3tYk1Xk4JsLYkO32BZCVfAtEPaeGR+6CXpVH5nA2cU03S376vlj1 +0nYe19uqU7Hzz7D+cgetmimIJtAz3ADXmoQFhK/3qXDkd85pTMlmYoXL1FJgWeXZ/Jh XwNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6-v6si8062869pll.406.2018.03.17.10.25.24; Sat, 17 Mar 2018 10:25:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753424AbeCQRVM (ORCPT + 99 others); Sat, 17 Mar 2018 13:21:12 -0400 Received: from isilmar-4.linta.de ([136.243.71.142]:35088 "EHLO isilmar-4.linta.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752676AbeCQRVL (ORCPT ); Sat, 17 Mar 2018 13:21:11 -0400 Received: from light.dominikbrodowski.net (isilmar.linta [10.0.0.1]) by isilmar-4.linta.de (Postfix) with ESMTPS id 6D4AC200910; Sat, 17 Mar 2018 17:21:10 +0000 (UTC) Received: by light.dominikbrodowski.net (Postfix, from userid 1000) id 6E86B20CA8; Sat, 17 Mar 2018 18:01:20 +0100 (CET) Date: Sat, 17 Mar 2018 18:01:20 +0100 From: Dominik Brodowski To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, viro@zeniv.linux.org.uk, luto@kernel.org, mingo@kernel.org, akpm@linux-foundation.org, arnd@arndb.de Subject: Re: [PATCH v2 16/36] fs: add ksys_dup{,3}() helper; remove in-kernel calls to sys_dup{,3}() Message-ID: <20180317170120.GC2226@light.dominikbrodowski.net> References: <20180315190529.20943-1-linux@dominikbrodowski.net> <20180315190529.20943-17-linux@dominikbrodowski.net> <20180316084834.GE4151@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180316084834.GE4151@infradead.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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