On Fri, Mar 30, 2012 at 3:02 PM, <bjschuma@xxxxxxxxxx> wrote: > From: Bryan Schumaker <bjschuma@xxxxxxxxxx> > > This can be shared by v2, v3 and v4 in their other common code. > > Signed-off-by: Bryan Schumaker <bjschuma@xxxxxxxxxx> > --- > fs/nfs/super.c | 26 ++++++-------------------- > 1 file changed, 6 insertions(+), 20 deletions(-) > > diff --git a/fs/nfs/super.c b/fs/nfs/super.c > index 37412f7..c9bc86e 100644 > --- a/fs/nfs/super.c > +++ b/fs/nfs/super.c > @@ -2135,16 +2135,18 @@ static void nfs_fill_super(struct super_block *sb, > > sb->s_blocksize_bits = 0; > sb->s_blocksize = 0; > - if (data->bsize) > + if (data && data->bsize) > sb->s_blocksize = nfs_block_size(data->bsize, &sb->s_blocksize_bits); > > - if (server->nfs_client->rpc_ops->version == 3) { > + if (server->nfs_client->rpc_ops->version != 2) { > /* The VFS shouldn't apply the umask to mode bits. We will do > * so ourselves when necessary. > */ > sb->s_flags |= MS_POSIXACL; > sb->s_time_gran = 1; > } > + if (server->nfs_client->rpc_ops->version == 4) > + sb->s_xattr = nfs4_xattr_handlers; > > sb->s_op = &nfs_sops; > nfs_initialise_sb(sb); > @@ -2520,22 +2522,6 @@ static void nfs4_clone_super(struct super_block *sb, > nfs_initialise_sb(sb); > } > > -/* > - * Set up an NFS4 superblock > - */ > -static void nfs4_fill_super(struct super_block *sb) > -{ > - sb->s_time_gran = 1; > - sb->s_op = &nfs4_sops; This seems to discard nfs4_sops (with the accompanying nfs4_evict_inode). Fred -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html