summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-11-04 13:46:40 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-11-04 16:42:52 -0500
commitfab99ebe39fe7d11fbd9b5fb84f07432af9ba36f (patch)
tree3e99cedfdeb6d582b4fd66a143994d2a86678516 /fs/nfs/nfs4proc.c
parentb944dba31d2c23f1cf5d69a66cc3449e0ba78503 (diff)
NFSv4.2: Remove redundant checks in nfs_setsecurity+nfs4_label_init_security
We already check for nfs_server_capable(inode, NFS_CAP_SECURITY_LABEL) in nfs4_label_alloc() We check the minor version in _nfs4_server_capabilities before setting NFS_CAP_SECURITY_LABEL. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index ed2a0e6b9aed..5ab33c0792df 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -105,9 +105,6 @@ nfs4_label_init_security(struct inode *dir, struct dentry *dentry,
105 if (nfs_server_capable(dir, NFS_CAP_SECURITY_LABEL) == 0) 105 if (nfs_server_capable(dir, NFS_CAP_SECURITY_LABEL) == 0)
106 return NULL; 106 return NULL;
107 107
108 if (NFS_SERVER(dir)->nfs_client->cl_minorversion < 2)
109 return NULL;
110
111 err = security_dentry_init_security(dentry, sattr->ia_mode, 108 err = security_dentry_init_security(dentry, sattr->ia_mode,
112 &dentry->d_name, (void **)&label->label, &label->len); 109 &dentry->d_name, (void **)&label->label, &label->len);
113 if (err == 0) 110 if (err == 0)