Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60825
b: refs/heads/master
c: 4b2ca38
h: refs/heads/master
i:
  60823: 9a5faf7
v: v3
  • Loading branch information
J. Bruce Fields authored and Linus Torvalds committed Jul 17, 2007
1 parent 4eae6ce commit dda051a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ac68d17996eb421dde51452b89d5545ba07c6fe
refs/heads/master: 4b2ca38ad6c44ed0442092a829e6e954bf3580af
3 changes: 3 additions & 0 deletions trunk/fs/nfsd/nfs4acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,13 +737,16 @@ int nfs4_acl_nfsv4_to_posix(struct nfs4_acl *acl, struct posix_acl **pacl,
*pacl = posix_state_to_acl(&effective_acl_state, flags);
if (IS_ERR(*pacl)) {
ret = PTR_ERR(*pacl);
*pacl = NULL;
goto out_dstate;
}
*dpacl = posix_state_to_acl(&default_acl_state,
flags | NFS4_ACL_TYPE_DEFAULT);
if (IS_ERR(*dpacl)) {
ret = PTR_ERR(*dpacl);
*dpacl = NULL;
posix_acl_release(*pacl);
*pacl = NULL;
goto out_dstate;
}
sort_pacl(*pacl);
Expand Down
22 changes: 7 additions & 15 deletions trunk/fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ nfsd4_set_nfs4_acl(struct svc_rqst *rqstp, struct svc_fh *fhp,
/* Get inode */
error = fh_verify(rqstp, fhp, 0 /* S_IFREG */, MAY_SATTR);
if (error)
goto out;
return error;

dentry = fhp->fh_dentry;
inode = dentry->d_inode;
Expand All @@ -444,33 +444,25 @@ nfsd4_set_nfs4_acl(struct svc_rqst *rqstp, struct svc_fh *fhp,

host_error = nfs4_acl_nfsv4_to_posix(acl, &pacl, &dpacl, flags);
if (host_error == -EINVAL) {
error = nfserr_attrnotsupp;
goto out;
return nfserr_attrnotsupp;
} else if (host_error < 0)
goto out_nfserr;

host_error = set_nfsv4_acl_one(dentry, pacl, POSIX_ACL_XATTR_ACCESS);
if (host_error < 0)
goto out_nfserr;
goto out_release;

if (S_ISDIR(inode->i_mode)) {
if (S_ISDIR(inode->i_mode))
host_error = set_nfsv4_acl_one(dentry, dpacl, POSIX_ACL_XATTR_DEFAULT);
if (host_error < 0)
goto out_nfserr;
}

error = nfs_ok;

out:
out_release:
posix_acl_release(pacl);
posix_acl_release(dpacl);
return (error);
out_nfserr:
if (host_error == -EOPNOTSUPP)
error = nfserr_attrnotsupp;
return nfserr_attrnotsupp;
else
error = nfserrno(host_error);
goto out;
return nfserrno(host_error);
}

static struct posix_acl *
Expand Down

0 comments on commit dda051a

Please sign in to comment.