mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 23:36:23 +09:00
nfs: we don't support removing system.nfs4_acl
[ Upstream commit 4f8be1f53bf615102d103c0509ffa9596f65b718 ] The NFSv4 protocol doesn't have any notion of reomoving an attribute, so removexattr(path,"system.nfs4_acl") doesn't make sense. There's no documented return value. Arguably it could be EOPNOTSUPP but I'm a little worried an application might take that to mean that we don't support ACLs or xattrs. How about EINVAL? Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
eed4e1abc9
commit
a2d07d077e
|
@ -5754,6 +5754,9 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl
|
||||||
unsigned int npages = DIV_ROUND_UP(buflen, PAGE_SIZE);
|
unsigned int npages = DIV_ROUND_UP(buflen, PAGE_SIZE);
|
||||||
int ret, i;
|
int ret, i;
|
||||||
|
|
||||||
|
/* You can't remove system.nfs4_acl: */
|
||||||
|
if (buflen == 0)
|
||||||
|
return -EINVAL;
|
||||||
if (!nfs4_server_supports_acls(server))
|
if (!nfs4_server_supports_acls(server))
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
if (npages > ARRAY_SIZE(pages))
|
if (npages > ARRAY_SIZE(pages))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user