Skip to content

Commit 4f8be1f

Browse files
J. Bruce Fieldsamschuma-ntap
authored andcommitted
nfs: we don't support removing system.nfs4_acl
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>
1 parent 53cb245 commit 4f8be1f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

fs/nfs/nfs4proc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5889,6 +5889,9 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl
58895889
unsigned int npages = DIV_ROUND_UP(buflen, PAGE_SIZE);
58905890
int ret, i;
58915891

5892+
/* You can't remove system.nfs4_acl: */
5893+
if (buflen == 0)
5894+
return -EINVAL;
58925895
if (!nfs4_server_supports_acls(server))
58935896
return -EOPNOTSUPP;
58945897
if (npages > ARRAY_SIZE(pages))

0 commit comments

Comments
 (0)