nfs_getcacheblk() can return 0 if the mount is interruptible. It need to be
checked by the caller. Broken in: rev. 1.70 (1999/05/02)
This commit is contained in:
parent
5af2ec36b0
commit
e868365294
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49659
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
|
||||
* $Id: nfs_bio.c,v 1.73 1999/06/16 23:27:46 mckusick Exp $
|
||||
* $Id: nfs_bio.c,v 1.74 1999/06/26 02:46:29 mckusick Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -802,6 +802,8 @@ nfs_write(ap)
|
||||
|
||||
bcount = on;
|
||||
bp = nfs_getcacheblk(vp, lbn, bcount, p);
|
||||
if (!bp)
|
||||
return (EINTR);
|
||||
save = bp->b_flags & B_CACHE;
|
||||
|
||||
np->n_size = uio->uio_offset + n;
|
||||
@ -821,6 +823,8 @@ nfs_write(ap)
|
||||
if ((off_t)(lbn + 1) * biosize > np->n_size)
|
||||
bcount = np->n_size - (off_t)lbn * biosize;
|
||||
bp = nfs_getcacheblk(vp, lbn, bcount, p);
|
||||
if (!bp)
|
||||
return (EINTR);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
|
||||
* $Id: nfs_bio.c,v 1.73 1999/06/16 23:27:46 mckusick Exp $
|
||||
* $Id: nfs_bio.c,v 1.74 1999/06/26 02:46:29 mckusick Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -802,6 +802,8 @@ nfs_write(ap)
|
||||
|
||||
bcount = on;
|
||||
bp = nfs_getcacheblk(vp, lbn, bcount, p);
|
||||
if (!bp)
|
||||
return (EINTR);
|
||||
save = bp->b_flags & B_CACHE;
|
||||
|
||||
np->n_size = uio->uio_offset + n;
|
||||
@ -821,6 +823,8 @@ nfs_write(ap)
|
||||
if ((off_t)(lbn + 1) * biosize > np->n_size)
|
||||
bcount = np->n_size - (off_t)lbn * biosize;
|
||||
bp = nfs_getcacheblk(vp, lbn, bcount, p);
|
||||
if (!bp)
|
||||
return (EINTR);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user