From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 01/14] NFS: Permit filesystem to override root dentry on mount [try #10] Date: Tue, 30 May 2006 11:45:32 +0100 Message-ID: <20060530104532.GW27946@ftp.linux.org.uk> References: <20060519154640.11791.2928.stgit@warthog.cambridge.redhat.com> <20060519154644.11791.72373.stgit@warthog.cambridge.redhat.com> Reply-To: Linux filesystem caching discussion list Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@osdl.org, aviro@redhat.com, linux-kernel@vger.kernel.org, nfsv4@linux-nfs.org, trond.myklebust@fys.uio.no, torvalds@osdl.org, linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org Return-path: To: David Howells Content-Disposition: inline In-Reply-To: <20060519154644.11791.72373.stgit@warthog.cambridge.redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cachefs-bounces@redhat.com Errors-To: linux-cachefs-bounces@redhat.com List-Id: linux-fsdevel.vger.kernel.org On Fri, May 19, 2006 at 04:46:45PM +0100, David Howells wrote: > informative error value to report). Call it foo_fill_super(). Now declare > > -struct super_block foo_get_sb(struct file_system_type *fs_type, > - int flags, const char *dev_name, void *data) > +int foo_get_sb(struct file_system_type *fs_type, > + int flags, const char *dev_name, void *data, struct vfsmount *mnt) > { > - return get_sb_bdev(fs_type, flags, dev_name, data, ext2_fill_super); > + return get_sb_bdev(fs_type, flags, dev_name, data, ext2_fill_super, > + mnt); > } BTW, s/ext2_fill_super/foo_fill_super/, while we are at it... > + BUG_ON(!mnt->mnt_sb); > + BUG_ON(!mnt->mnt_sb->s_root); > + BUG_ON(!mnt->mnt_root); FWIW, I'm not sure it's needed. We do > + up_write(&mnt->mnt_sb->s_umount); soon enough and it will catch all likely breakage without cluttering the code with BUG_ON(). Other than that, no objections.