提交 00bd2393 编写于 作者: J J. Bruce Fields 提交者: Yang Yingliang

nfs: we don't support removing system.nfs4_acl

stable inclusion
from linux-4.19.184
commit 29898ad7b4e99bb4366fae915b7c3ea234584774

--------------------------------

[ Upstream commit 4f8be1f5 ]

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: NJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: NHou Tao <houtao1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 7dac89cb
...@@ -5526,6 +5526,9 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl ...@@ -5526,6 +5526,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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册