Fix from Doug Rabson: Don't try to release a pbuf we didn't get.

Minor style change by me.
This commit is contained in:
dg 1995-03-19 13:28:54 +00:00
parent a250fca783
commit bd70a780f0

View File

@ -33,7 +33,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94
* $Id: vfs_cluster.c,v 1.12 1995/03/04 03:24:28 davidg Exp $
* $Id: vfs_cluster.c,v 1.13 1995/03/16 18:12:48 bde Exp $
*/
#include <sys/param.h>
@ -509,8 +509,9 @@ cluster_wbuild(vp, last_bp, size, start_lbn, len, lbn)
pb = trypbuf();
/* Get more memory for current buffer */
if (len <= 1 || pb == 0) {
relpbuf(pb);
if (len <= 1 || pb == NULL) {
if (pb != NULL)
relpbuf(pb);
if (last_bp) {
bawrite(last_bp);
} else if (len) {
@ -528,7 +529,7 @@ cluster_wbuild(vp, last_bp, size, start_lbn, len, lbn)
tbp->b_flags |= B_BUSY;
last_bp = 0;
pb = trypbuf();
if( pb == 0) {
if (pb == NULL) {
bawrite(tbp);
return;
}