From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759032AbYB0UbN (ORCPT ); Wed, 27 Feb 2008 15:31:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754161AbYB0Ua6 (ORCPT ); Wed, 27 Feb 2008 15:30:58 -0500 Received: from x35.xmailserver.org ([64.71.152.41]:37208 "EHLO x35.xmailserver.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751052AbYB0Ua5 (ORCPT ); Wed, 27 Feb 2008 15:30:57 -0500 X-AuthUser: davidel@xmailserver.org Date: Wed, 27 Feb 2008 12:30:55 -0800 (PST) From: Davide Libenzi X-X-Sender: davide@alien.or.mcafeemobile.com To: Roland Dreier cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, Linux Kernel Mailing List , Avi Kivity , kvm-devel@lists.sourceforge.net, Andrew Morton , Al Viro Subject: Re: [PATCH/RFC 1/2] anon-inodes: Remove fd_install() from anon_inode_getfd() In-Reply-To: Message-ID: References: <20080225191043.GA32342@lst.de> X-GPG-FINGRPRINT: CFAE 5BEE FD36 F65E E640 56FE 0974 BF23 270F 474E X-GPG-PUBLIC_KEY: http://www.xmailserver.org/davidel.asc MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 27 Feb 2008, Roland Dreier wrote: > > > The anonymous inodes interface anon_inode_getfd() calls fd_install() > > > for the newly created fd, which does not work for some use cases where > > > the caller must do futher initialization before exposing the file to > > > userspace. This is also probably not the safest interface, since the > > > caller must be sure that it is OK if userspace closes the fd before > > > anon_inode_getfd() even returns. > > > > I believe Al changed the interface to not give out inode* and file*, *and* > > call fd_install() inside it. I'd slightly prefer Al version, although I > > don't see any major problems in this one too. > > Any pointer to that patch? A web search for "viro" and > "anon_inode_getfd" doesn't turn up anything likely looking. It's inside his vfs git tree: http://git.kernel.org/?p=linux/kernel/git/viro/vfs-2.6.git;a=commit;h=49be4f8114e6ff0efdab10ebba2493fb67bc3034 I'm fine with both approaches. - Davide