diff options
author | dfr <dfr@FreeBSD.org> | 1996-10-21 10:07:52 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1996-10-21 10:07:52 +0000 |
commit | dacf99d4007d189c16a606789eed73b313c5a9a6 (patch) | |
tree | 14d2af569e7970638efa7d5f927629435bce025a /sys/nfsclient/nfs_bio.c | |
parent | d225820440c2849687d9bd421a5132fc9df142f2 (diff) | |
download | FreeBSD-src-dacf99d4007d189c16a606789eed73b313c5a9a6.zip FreeBSD-src-dacf99d4007d189c16a606789eed73b313c5a9a6.tar.gz |
If a large (>4096 bytes) directory was modified, the old directory
contents are discarded, including the cached seek cookies.
Unfortunately, if the directory was larger than NFS_DIRBLKSIZ, then
this confused nfs_readdirrpc(), making it appear as if the directory
was truncated.
Reviewed by: Karl Denninger <karl@Mcs.Net>
Diffstat (limited to 'sys/nfsclient/nfs_bio.c')
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index a072967..c57db67 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_bio.c 8.5 (Berkeley) 1/4/94 - * $Id: nfs_bio.c,v 1.26 1996/10/11 10:15:30 dfr Exp $ + * $Id: nfs_bio.c,v 1.27 1996/10/12 17:39:39 bde Exp $ */ #include <sys/param.h> @@ -319,6 +319,7 @@ again: vfs_busy_pages(bp, 0); error = nfs_doio(bp, cred, p); if (error) { + vfs_unbusy_pages(bp); brelse(bp); while (error == NFSERR_BAD_COOKIE) { nfs_invaldir(vp); @@ -337,7 +338,10 @@ again: bp->b_flags |= B_READ; vfs_busy_pages(bp, 0); error = nfs_doio(bp, cred, p); - if (error) + if (error) { + vfs_unbusy_pages(bp); + brelse(bp); + } else if (i < lbn) brelse(bp); } } |