Commit f3b64eb6 authored by J.Bruce Fields's avatar J.Bruce Fields Committed by Linus Torvalds

[PATCH] knfsd: nfsd4: acls: simplify nfs4_acl_nfsv4_to_posix interface

There's no need to handle the case where the caller passes in null for pacl or
dpacl; no caller does that, because it would be a dumb thing to do.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b548edc2
...@@ -360,7 +360,6 @@ nfs4_acl_nfsv4_to_posix(struct nfs4_acl *acl, struct posix_acl **pacl, ...@@ -360,7 +360,6 @@ nfs4_acl_nfsv4_to_posix(struct nfs4_acl *acl, struct posix_acl **pacl,
if (error < 0) if (error < 0)
goto out_acl; goto out_acl;
if (pacl != NULL) {
if (acl->naces == 0) { if (acl->naces == 0) {
error = -ENODATA; error = -ENODATA;
goto try_dpacl; goto try_dpacl;
...@@ -372,10 +371,7 @@ nfs4_acl_nfsv4_to_posix(struct nfs4_acl *acl, struct posix_acl **pacl, ...@@ -372,10 +371,7 @@ nfs4_acl_nfsv4_to_posix(struct nfs4_acl *acl, struct posix_acl **pacl,
*pacl = NULL; *pacl = NULL;
goto out_acl; goto out_acl;
} }
}
try_dpacl: try_dpacl:
if (dpacl != NULL) {
if (dacl->naces == 0) { if (dacl->naces == 0) {
if (pacl == NULL || *pacl == NULL) if (pacl == NULL || *pacl == NULL)
error = -ENODATA; error = -ENODATA;
...@@ -389,10 +385,8 @@ try_dpacl: ...@@ -389,10 +385,8 @@ try_dpacl:
*dpacl = NULL; *dpacl = NULL;
goto out_acl; goto out_acl;
} }
}
out_acl: out_acl:
if (error && pacl) { if (error) {
posix_acl_release(*pacl); posix_acl_release(*pacl);
*pacl = NULL; *pacl = NULL;
} }
......
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