Commit ba1816b4 authored by Sergio Gelato's avatar Sergio Gelato Committed by Jiri Slaby

nfsd: fix NFS regression

Fix regression introduced in pre-3.14 kernels by cherry-picking
aa07c713 (NFSD: Call ->set_acl with a
NULL ACL structure if no entries). This is in v3.12.22 as commit
723ac81c.

The affected code was removed in 3.14 by commit
4ac7249e (nfsd: use get_acl
and ->set_acl). The ->set_acl methods are already able to cope with a
NULL argument. So this is not needed for >= 3.14.
Signed-off-by: default avatarSergio Gelato <Sergio.Gelato@astro.su.se>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 0e8361ae
......@@ -509,6 +509,9 @@ set_nfsv4_acl_one(struct dentry *dentry, struct posix_acl *pacl, char *key)
char *buf = NULL;
int error = 0;
if (!pacl)
return vfs_setxattr(dentry, key, NULL, 0, 0);
buflen = posix_acl_xattr_size(pacl->a_count);
buf = kmalloc(buflen, GFP_KERNEL);
error = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment