summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-12-10 07:31:02 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2020-01-15 10:15:16 -0500
commitba8b6148067f51528dedf65b533d5094e25e6205 (patch)
treecb3652e512949b7382e98f0f5a48232c1089838c
parentab88dca311a3722a66f7dee3c352e634ad1e6a25 (diff)
nfs_clone_sb_security(): simplify the check for server bogosity
We used to check ->i_op for being nfs_dir_inode_operations. With separate inode_operations for v3 and v4 that became bogus, but rather than going for protocol-dependent comparison we could've just checked ->i_fop instead; _that_ is the same for all protocol versions. Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r--fs/nfs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 2bcf0f8295e0..bec6c341f72c 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2578,7 +2578,7 @@ int nfs_clone_sb_security(struct super_block *s, struct dentry *mntroot,
unsigned long kflags = 0, kflags_out = 0;
/* clone any lsm security options from the parent to the new sb */
- if (d_inode(mntroot)->i_op != NFS_SB(s)->nfs_client->rpc_ops->dir_inode_ops)
+ if (d_inode(mntroot)->i_fop != &nfs_dir_operations)
return -ESTALE;
if (NFS_SB(s)->caps & NFS_CAP_SECURITY_LABEL)