Commit f87d928f authored by Trond Myklebust's avatar Trond Myklebust

NFSv3: Fix another acl regression

When creating a new object on the NFS server, we should not be sending
posix setacl requests unless the preceding posix_acl_create returned a
non-trivial acl. Doing so, causes Solaris servers in particular to
return an EINVAL.

Fixes: 013cdf10 (nfs: use generic posix ACL infrastructure,,,)
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1132786
Cc: stable@vger.kernel.org # 3.14+
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 412f6c4c
...@@ -129,7 +129,10 @@ static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, ...@@ -129,7 +129,10 @@ static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
.rpc_argp = &args, .rpc_argp = &args,
.rpc_resp = &fattr, .rpc_resp = &fattr,
}; };
int status; int status = 0;
if (acl == NULL && (!S_ISDIR(inode->i_mode) || dfacl == NULL))
goto out;
status = -EOPNOTSUPP; status = -EOPNOTSUPP;
if (!nfs_server_capable(inode, NFS_CAP_ACLS)) if (!nfs_server_capable(inode, NFS_CAP_ACLS))
......
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