From 4f4a4faddea0fe45bf508e723c3a810c5190ed62 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Fri, 1 Feb 2013 15:13:04 -0500 Subject: 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 Signed-off-by: J. Bruce Fields Signed-off-by: Al Viro --- fs/nfsd/nfsxdr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'fs/nfsd/nfsxdr.c') diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c index bf6d3bc..96e5619 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, } /* Helper function for NFSv2 ACL code */ -__be32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp) +__be32 *nfs2svc_encode_fattr(struct svc_rqst *rqstp, __be32 *p, struct svc_fh *fhp, struct kstat *stat) { - struct kstat stat; - fh_getattr(fhp, &stat); /* BUG */ - return encode_fattr(rqstp, p, fhp, &stat); + return encode_fattr(rqstp, p, fhp, stat); } /* -- cgit v1.1