|
@@ -1475,7 +1475,7 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags,
|
|
error = PTR_ERR(mntroot);
|
|
error = PTR_ERR(mntroot);
|
|
goto error_splat_super;
|
|
goto error_splat_super;
|
|
}
|
|
}
|
|
- if (mntroot->d_inode->i_op != server->nfs_client->rpc_ops->dir_inode_ops) {
|
|
|
|
|
|
+ if (mntroot->d_inode->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops) {
|
|
dput(mntroot);
|
|
dput(mntroot);
|
|
error = -ESTALE;
|
|
error = -ESTALE;
|
|
goto error_splat_super;
|
|
goto error_splat_super;
|
|
@@ -1826,6 +1826,11 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags,
|
|
error = PTR_ERR(mntroot);
|
|
error = PTR_ERR(mntroot);
|
|
goto error_splat_super;
|
|
goto error_splat_super;
|
|
}
|
|
}
|
|
|
|
+ if (mntroot->d_inode->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops) {
|
|
|
|
+ dput(mntroot);
|
|
|
|
+ error = -ESTALE;
|
|
|
|
+ goto error_splat_super;
|
|
|
|
+ }
|
|
|
|
|
|
s->s_flags |= MS_ACTIVE;
|
|
s->s_flags |= MS_ACTIVE;
|
|
mnt->mnt_sb = s;
|
|
mnt->mnt_sb = s;
|
|
@@ -1900,6 +1905,11 @@ static int nfs4_referral_get_sb(struct file_system_type *fs_type, int flags,
|
|
error = PTR_ERR(mntroot);
|
|
error = PTR_ERR(mntroot);
|
|
goto error_splat_super;
|
|
goto error_splat_super;
|
|
}
|
|
}
|
|
|
|
+ if (mntroot->d_inode->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops) {
|
|
|
|
+ dput(mntroot);
|
|
|
|
+ error = -ESTALE;
|
|
|
|
+ goto error_splat_super;
|
|
|
|
+ }
|
|
|
|
|
|
s->s_flags |= MS_ACTIVE;
|
|
s->s_flags |= MS_ACTIVE;
|
|
mnt->mnt_sb = s;
|
|
mnt->mnt_sb = s;
|