diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2014-07-09 09:54:16 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-07-11 15:03:53 -0400 |
commit | 35e634b83cbe23e5673289d1536752968aab8f75 (patch) | |
tree | 77660dfe5a38520090ac78c8a1f1a967dd42771c /fs/nfsd/nfs3acl.c | |
parent | 255942907e7ff498ab1545b5edce5690833ff640 (diff) |
NFSD: Check acl returned from get_acl/posix_acl_from_mode
Commit 4ac7249ea5 (nfsd: use get_acl and ->set_acl)
don't check the acl returned from get_acl()/posix_acl_from_mode().
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs3acl.c')
-rw-r--r-- | fs/nfsd/nfs3acl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfsd/nfs3acl.c b/fs/nfsd/nfs3acl.c index 2a514e21dc74..34cbbab6abd7 100644 --- a/fs/nfsd/nfs3acl.c +++ b/fs/nfsd/nfs3acl.c | |||
@@ -47,14 +47,14 @@ static __be32 nfsd3_proc_getacl(struct svc_rqst * rqstp, | |||
47 | 47 | ||
48 | if (resp->mask & (NFS_ACL|NFS_ACLCNT)) { | 48 | if (resp->mask & (NFS_ACL|NFS_ACLCNT)) { |
49 | acl = get_acl(inode, ACL_TYPE_ACCESS); | 49 | acl = get_acl(inode, ACL_TYPE_ACCESS); |
50 | if (IS_ERR(acl)) { | ||
51 | nfserr = nfserrno(PTR_ERR(acl)); | ||
52 | goto fail; | ||
53 | } | ||
54 | if (acl == NULL) { | 50 | if (acl == NULL) { |
55 | /* Solaris returns the inode's minimum ACL. */ | 51 | /* Solaris returns the inode's minimum ACL. */ |
56 | acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); | 52 | acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL); |
57 | } | 53 | } |
54 | if (IS_ERR(acl)) { | ||
55 | nfserr = nfserrno(PTR_ERR(acl)); | ||
56 | goto fail; | ||
57 | } | ||
58 | resp->acl_access = acl; | 58 | resp->acl_access = acl; |
59 | } | 59 | } |
60 | if (resp->mask & (NFS_DFACL|NFS_DFACLCNT)) { | 60 | if (resp->mask & (NFS_DFACL|NFS_DFACLCNT)) { |