diff --git a/fs/nfs/super.c b/fs/nfs/super.c index fa517ae9207f6d04f66fcf4c0b12ef229bc5a176..71067d1ac9d9a2007d30bc235b236b1ccf1daf7e 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1474,6 +1474,11 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags, error = PTR_ERR(mntroot); goto error_splat_super; } + if (mntroot->d_inode->i_op != &nfs_dir_inode_operations) { + dput(mntroot); + error = -ESTALE; + goto error_splat_super; + } s->s_flags |= MS_ACTIVE; mnt->mnt_sb = s;