Commit f87d928f authored by Trond Myklebust's avatar Trond Myklebust
Browse files

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
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -129,7 +129,10 @@ static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
		.rpc_argp	= &args,
		.rpc_resp	= &fattr,
	};
	int status;
	int status = 0;

	if (acl == NULL && (!S_ISDIR(inode->i_mode) || dfacl == NULL))
		goto out;

	status = -EOPNOTSUPP;
	if (!nfs_server_capable(inode, NFS_CAP_ACLS))