[Linux-cachefs] Re: [PATCH 01/14] NFS: Permit filesystem to override root dentry on mount [try #10]

Al Viro viro at ftp.linux.org.uk
Tue May 30 10:45:32 UTC 2006


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.




More information about the Linux-cachefs mailing list