/* Set the Access and/or Default ACL of a file.  */
static __be32 nfsacld_proc_setacl(struct svc_rqst *rqstp, struct nfsd3_setaclargs *argp, struct nfsd_attrstat *resp)
/* Set the Access and/or Default ACL of a file.  */
static __be32 nfsacld_proc_setacl(struct svc_rqst *rqstp, struct nfsd3_setaclargs *argp, struct nfsd_attrstat *resp)
{
	svc_fh *fh;
	__be32 nfserr = 0;
	dprintk("nfsd: SETACL(2acl)   %s\n", SVCFH_fmt(&argp->fh));
	fh = fh_copy(&resp->fh, &argp->fh);
	nfserr = fh_verify(rqstp, &resp->fh, 0, NFSD_MAY_SATTR);
	if (!nfserr) {
		nfserr = nfserrno( nfsd_set_posix_acl(
			fh, ACL_TYPE_ACCESS, argp->acl_access) );
	}
	if (!nfserr) {
		nfserr = nfserrno( nfsd_set_posix_acl(
			fh, ACL_TYPE_DEFAULT, argp->acl_default) );
	}
	posix_acl_release(argp->acl_access);
	posix_acl_release(argp->acl_default);
	return nfserr;
}