Commit 096455a2 authored by J. Bruce Fields's avatar J. Bruce Fields Committed by Trond Myklebust

NFSv4: Dont list system.nfs4_acl for filesystems that don't support it.

Thanks to Frank Filz for pointing out that we list system.nfs4_acl extended
attribute even on filesystems where we don't actually support nfs4_acl.
This is inconsistent with the e.g. ext3 POSIX ACL behaviour, and seems to
annoy cp.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 9e57b302
...@@ -3559,6 +3559,8 @@ ssize_t nfs4_listxattr(struct dentry *dentry, char *buf, size_t buflen) ...@@ -3559,6 +3559,8 @@ ssize_t nfs4_listxattr(struct dentry *dentry, char *buf, size_t buflen)
{ {
size_t len = strlen(XATTR_NAME_NFSV4_ACL) + 1; size_t len = strlen(XATTR_NAME_NFSV4_ACL) + 1;
if (!nfs4_server_supports_acls(NFS_SERVER(dentry->d_inode)))
return 0;
if (buf && buflen < len) if (buf && buflen < len)
return -ERANGE; return -ERANGE;
if (buf) if (buf)
......
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