aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/inode.c6
-rw-r--r--fs/nfs/nfs4proc.c3
2 files changed, 0 insertions, 9 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);
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)