aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfsxdr.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@fieldses.org>2013-02-01 15:13:04 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-26 02:46:09 -0500
commit4f4a4faddea0fe45bf508e723c3a810c5190ed62 (patch)
tree8c34a07ce0258fcc187f0884f2fc58c7361686bb /fs/nfsd/nfsxdr.c
parent3dadecce20603aa380023c65e6f55f108fd5e952 (diff)
nfsd: handle vfs_getattr errors in acl protocol
We're currently ignoring errors from vfs_getattr. The correct thing to do is to do the stat in the main service procedure not in the response encoding. Reported-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfsd/nfsxdr.c')
-rw-r--r--fs/nfsd/nfsxdr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c
index bf6d3bccdd98..96e56192f984 100644
--- a/fs/nfsd/nfsxdr.c
+++ b/fs/nfsd/nfsxdr.c
@@ -195,11 +195,9 @@ encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp,
195} 195}
196 196
197/* Helper function for NFSv2 ACL code */ 197/* Helper function for NFSv2 ACL code */
198__be32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp) 198__be32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp, struct kstat *stat)
199{ 199{
200 struct kstat stat; 200 return encode_fattr(rqstp, p, fhp, stat);
201 fh_getattr(fhp, &stat); /* BUG */
202 return encode_fattr(rqstp, p, fhp, &stat);
203} 201}
204 202
205/* 203/*