aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu/ext2fs/ext2_bmap.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1994-10-08 06:57:29 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1994-10-08 06:57:29 +0000
commit0f954e5d09fcdf4d7753dbc0c7315f2d7cc93607 (patch)
treeb052bb50ffa6a013d919c68a25235f4df098267c /sys/gnu/ext2fs/ext2_bmap.c
parent80fb3d79f6be945c4fbdfae84f12172de827407f (diff)
Notes
Diffstat (limited to 'sys/gnu/ext2fs/ext2_bmap.c')
-rw-r--r--sys/gnu/ext2fs/ext2_bmap.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/gnu/ext2fs/ext2_bmap.c b/sys/gnu/ext2fs/ext2_bmap.c
index 6f38edc4d211..f3009bd30584 100644
--- a/sys/gnu/ext2fs/ext2_bmap.c
+++ b/sys/gnu/ext2fs/ext2_bmap.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_bmap.c 8.6 (Berkeley) 1/21/94
- * $Id$
+ * $Id: ufs_bmap.c,v 1.3 1994/08/02 07:54:52 davidg Exp $
*/
#include <sys/param.h>
@@ -54,6 +54,8 @@
#include <ufs/ufs/ufsmount.h>
#include <ufs/ufs/ufs_extern.h>
+int ufs_bmaparray __P((struct vnode *, daddr_t, daddr_t *, struct indir *, int *, int *));
+
/*
* Bmap converts a the logical block number of a file to its physical block
* number on the disk. The conversion is done by using the logical block
@@ -137,7 +139,8 @@ ufs_bmaparray(vp, bn, bnp, ap, nump, runp)
xap = ap == NULL ? a : ap;
if (!nump)
nump = &num;
- if (error = ufs_getlbns(vp, bn, xap, nump))
+ error = ufs_getlbns(vp, bn, xap, nump);
+ if (error)
return (error);
num = *nump;
@@ -165,7 +168,7 @@ ufs_bmaparray(vp, bn, bnp, ap, nump, runp)
*/
metalbn = xap->in_lbn;
- if (daddr == 0 && !incore(vp, metalbn) || metalbn == bn)
+ if ((daddr == 0 && !incore(vp, metalbn)) || metalbn == bn)
break;
/*
* If we get here, we've either got the block in the cache
@@ -189,7 +192,8 @@ ufs_bmaparray(vp, bn, bnp, ap, nump, runp)
bp->b_flags |= B_READ;
VOP_STRATEGY(bp);
curproc->p_stats->p_ru.ru_inblock++; /* XXX */
- if (error = biowait(bp)) {
+ error = biowait(bp);
+ if (error) {
brelse(bp);
return (error);
}