diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-11-04 13:46:40 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-11-04 16:42:52 -0500 |
commit | fab99ebe39fe7d11fbd9b5fb84f07432af9ba36f (patch) | |
tree | 3e99cedfdeb6d582b4fd66a143994d2a86678516 /fs/nfs/inode.c | |
parent | b944dba31d2c23f1cf5d69a66cc3449e0ba78503 (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/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 26e77d81234e..18ab2da4eeb6 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -274,12 +274,6 @@ void nfs_setsecurity(struct inode *inode, struct nfs_fattr *fattr, | |||
274 | if (label == NULL) | 274 | if (label == NULL) |
275 | return; | 275 | return; |
276 | 276 | ||
277 | if (nfs_server_capable(inode, NFS_CAP_SECURITY_LABEL) == 0) | ||
278 | return; | ||
279 | |||
280 | if (NFS_SERVER(inode)->nfs_client->cl_minorversion < 2) | ||
281 | return; | ||
282 | |||
283 | if ((fattr->valid & NFS_ATTR_FATTR_V4_SECURITY_LABEL) && inode->i_security) { | 277 | if ((fattr->valid & NFS_ATTR_FATTR_V4_SECURITY_LABEL) && inode->i_security) { |
284 | error = security_inode_notifysecctx(inode, label->label, | 278 | error = security_inode_notifysecctx(inode, label->label, |
285 | label->len); | 279 | label->len); |