summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsserver
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2014-07-04 22:47:07 +0000
committerrmacklem <rmacklem@FreeBSD.org>2014-07-04 22:47:07 +0000
commit210206ed5b424833c7d3bd8e7517677739b0e591 (patch)
tree8dd7bc5f1359b6858d55a5685dd7f1fe91c52480 /sys/fs/nfsserver
parent005e0d33a793f8d36accd1174e8cd61eb0b6ebb1 (diff)
downloadFreeBSD-src-210206ed5b424833c7d3bd8e7517677739b0e591.zip
FreeBSD-src-210206ed5b424833c7d3bd8e7517677739b0e591.tar.gz
The new NFSv3 server did not generate directory postop attributes for
the reply to ReaddirPlus when the server failed within the loop that calls VFS_VGET(). This failure is most likely an error return from VFS_VGET() caused by a bogus d_fileno that was truncated to 32bits. This patch fixes the server so that it will return directory postop attributes for the failure. It does not fix the underlying issue caused by d_fileno being uint32_t when a file system like ZFS generates a fileno that is greater than 32bits. Reported by: jpaetzel Reviewed by: jpaetzel MFC after: 1 month
Diffstat (limited to 'sys/fs/nfsserver')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdport.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index 84660ac..c7d7229 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -2264,9 +2264,11 @@ again:
if (dirlen > cnt || nd->nd_repstat) {
if (!nd->nd_repstat && entrycnt == 0)
nd->nd_repstat = NFSERR_TOOSMALL;
- if (nd->nd_repstat)
+ if (nd->nd_repstat) {
newnfs_trimtrailing(nd, mb0, bpos0);
- else
+ if (nd->nd_flag & ND_NFSV3)
+ nfsrv_postopattr(nd, getret, &at);
+ } else
newnfs_trimtrailing(nd, mb1, bpos1);
eofflag = 0;
} else if (cpos < cend)
OpenPOWER on IntegriCloud