From a334de28665b14f0a33df82699fa9a78cfeedf31 Mon Sep 17 00:00:00 2001 From: David Shaw Date: Fri, 6 Jan 2006 00:19:58 -0800 Subject: [PATCH] knfsd: check error status from vfs_getattr and i_op->fsync Both vfs_getattr and i_op->fsync return error statuses which nfsd was largely ignoring. This as noticed when exporting directories using fuse. This patch cleans up most of the offences, which involves moving the call to vfs_getattr out of the xdr encoding routines (where it is too late to report an error) into the main NFS procedure handling routines. There is still a called to vfs_gettattr (related to the ACL code) where the status is ignored, and called to nfsd_sync_dir don't check return status either. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/nfsd/xdr.h | 3 +++ include/linux/nfsd/xdr3.h | 1 + 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/linux/nfsd/xdr.h b/include/linux/nfsd/xdr.h index 130d4f588a3..3f4f7142bbe 100644 --- a/include/linux/nfsd/xdr.h +++ b/include/linux/nfsd/xdr.h @@ -88,10 +88,12 @@ struct nfsd_readdirargs { struct nfsd_attrstat { struct svc_fh fh; + struct kstat stat; }; struct nfsd_diropres { struct svc_fh fh; + struct kstat stat; }; struct nfsd_readlinkres { @@ -101,6 +103,7 @@ struct nfsd_readlinkres { struct nfsd_readres { struct svc_fh fh; unsigned long count; + struct kstat stat; }; struct nfsd_readdirres { diff --git a/include/linux/nfsd/xdr3.h b/include/linux/nfsd/xdr3.h index 3c2a71b43ba..a4322741f8b 100644 --- a/include/linux/nfsd/xdr3.h +++ b/include/linux/nfsd/xdr3.h @@ -126,6 +126,7 @@ struct nfsd3_setaclargs { struct nfsd3_attrstat { __u32 status; struct svc_fh fh; + struct kstat stat; }; /* LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD */ -- cgit v1.2.3