From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Emelyanov Subject: Re: [RFC][PATCH] ns: Syscalls for better namespace sharing control. Date: Sat, 27 Feb 2010 00:35:43 +0300 Message-ID: <4B883EAF.5020607@parallels.com> References: <4B4F24AC.70105@trash.net> <1263481549.23480.24.camel@bigi> <4B4F3A50.1050400@trash.net> <1263490403.23480.109.camel@bigi> <4B50403A.6010507@trash.net> <1263568754.23480.142.camel@bigi> <1266875729.3673.12.camel@bigi> <1266931623.3973.643.camel@bigi> <1266934817.3973.654.camel@bigi> <1266966581.3973.675.camel@bigi> <4B883987.6090408@parallels.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Eric W. Biederman" Cc: Ben Greear , Linux Netdev List , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Netfilter Development Mailinglist , Daniel Lezcano List-Id: containers.vger.kernel.org Eric W. Biederman wrote: > Pavel Emelyanov writes: > >>> +static struct inode *nsfd_mkinode(void) >>> +{ >>> + struct inode *inode; >>> + inode = new_inode(nsfd_mnt->mnt_sb); >>> + if (!inode) >>> + return ERR_PTR(-ENOMEM); >>> + >>> + inode->i_fop = &nsfd_file_operations; >>> + >>> + /* >>> + * Mark the inode dirty from the very beginning, >>> + * that way it will never be moved to the dirty >>> + * list because mark_inode_dirty() will think that >>> + * it already _is_ on the dirty list. >>> + */ >>> + inode->i_state = I_DIRTY; >>> + inode->i_mode = S_IRUSR | S_IWUSR; >>> + inode->i_uid = current_fsuid(); >>> + inode->i_gid = current_fsgid(); >>> + inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; >>> + return inode; >>> +} >> Why not use anon inodes? > > Because you can't mount them anywhere. Worth changing them that way?