diff options
-rw-r--r-- | sys/kern/spec_vnops.c | 7 | ||||
-rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c index c17f2af5740..abd1dfa98c8 100644 --- a/sys/kern/spec_vnops.c +++ b/sys/kern/spec_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spec_vnops.c,v 1.29 2005/05/24 04:45:13 pedro Exp $ */ +/* $OpenBSD: spec_vnops.c,v 1.30 2005/12/29 20:00:52 pedro Exp $ */ /* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */ /* @@ -389,10 +389,7 @@ spec_write(v) bn = (uio->uio_offset / ssize) &~ (bscale - 1); on = uio->uio_offset % bsize; n = min((unsigned)(bsize - on), uio->uio_resid); - if (n == bsize) - bp = getblk(vp, bn, bsize, 0, 0); - else - error = bread(vp, bn, bsize, NOCRED, &bp); + error = bread(vp, bn, bsize, NOCRED, &bp); n = min(n, bsize - bp->b_resid); if (error) { brelse(bp); diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index c17f2af5740..abd1dfa98c8 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spec_vnops.c,v 1.29 2005/05/24 04:45:13 pedro Exp $ */ +/* $OpenBSD: spec_vnops.c,v 1.30 2005/12/29 20:00:52 pedro Exp $ */ /* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */ /* @@ -389,10 +389,7 @@ spec_write(v) bn = (uio->uio_offset / ssize) &~ (bscale - 1); on = uio->uio_offset % bsize; n = min((unsigned)(bsize - on), uio->uio_resid); - if (n == bsize) - bp = getblk(vp, bn, bsize, 0, 0); - else - error = bread(vp, bn, bsize, NOCRED, &bp); + error = bread(vp, bn, bsize, NOCRED, &bp); n = min(n, bsize - bp->b_resid); if (error) { brelse(bp); |