diff options
author | tegge <tegge@FreeBSD.org> | 1998-01-31 01:27:18 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 1998-01-31 01:27:18 +0000 |
commit | 72e132a1295c212b09cdcc6e187869f623ab69fb (patch) | |
tree | c625caea6c4ace20a32e5922fec232a77fe609fa /sys/nfsclient/nfs_bio.c | |
parent | fb57eef279e7dd5016dd7514b5c507929a8fe7ac (diff) | |
download | FreeBSD-src-72e132a1295c212b09cdcc6e187869f623ab69fb.zip FreeBSD-src-72e132a1295c212b09cdcc6e187869f623ab69fb.tar.gz |
Release the buffer when an error occurs while reading directory entries.
Diffstat (limited to 'sys/nfsclient/nfs_bio.c')
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index 641d9ec..a9c5c43 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95 - * $Id: nfs_bio.c,v 1.46 1998/01/06 05:21:38 dyson Exp $ + * $Id: nfs_bio.c,v 1.47 1998/01/25 06:24:09 dyson Exp $ */ @@ -377,6 +377,9 @@ again: bp->b_flags |= B_READ; vfs_busy_pages(bp, 0); error = nfs_doio(bp, cred, p); + if (error) { + brelse(bp); + } while (error == NFSERR_BAD_COOKIE) { nfs_invaldir(vp); error = nfs_vinvalbuf(vp, 0, cred, p, 1); @@ -404,9 +407,9 @@ again: } } } - if (error) - return (error); } + if (error) + return (error); } /* |