aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index ea929207f274..0b0c72a072ff 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1475,7 +1475,7 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags,
1475 error = PTR_ERR(mntroot); 1475 error = PTR_ERR(mntroot);
1476 goto error_splat_super; 1476 goto error_splat_super;
1477 } 1477 }
1478 if (mntroot->d_inode->i_op != server->nfs_client->rpc_ops->dir_inode_ops) { 1478 if (mntroot->d_inode->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops) {
1479 dput(mntroot); 1479 dput(mntroot);
1480 error = -ESTALE; 1480 error = -ESTALE;
1481 goto error_splat_super; 1481 goto error_splat_super;
@@ -1826,6 +1826,11 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags,
1826 error = PTR_ERR(mntroot); 1826 error = PTR_ERR(mntroot);
1827 goto error_splat_super; 1827 goto error_splat_super;
1828 } 1828 }
1829 if (mntroot->d_inode->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops) {
1830 dput(mntroot);
1831 error = -ESTALE;
1832 goto error_splat_super;
1833 }
1829 1834
1830 s->s_flags |= MS_ACTIVE; 1835 s->s_flags |= MS_ACTIVE;
1831 mnt->mnt_sb = s; 1836 mnt->mnt_sb = s;
@@ -1900,6 +1905,11 @@ static int nfs4_referral_get_sb(struct file_system_type *fs_type, int flags,
1900 error = PTR_ERR(mntroot); 1905 error = PTR_ERR(mntroot);
1901 goto error_splat_super; 1906 goto error_splat_super;
1902 } 1907 }
1908 if (mntroot->d_inode->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops) {
1909 dput(mntroot);
1910 error = -ESTALE;
1911 goto error_splat_super;
1912 }
1903 1913
1904 s->s_flags |= MS_ACTIVE; 1914 s->s_flags |= MS_ACTIVE;
1905 mnt->mnt_sb = s; 1915 mnt->mnt_sb = s;