aboutsummaryrefslogtreecommitdiff
path: root/sys/ufs
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2002-12-18 07:19:41 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2002-12-18 07:19:41 +0000
commit6d967351b4dc23909e569bee7b6bea72e8dfc0c0 (patch)
treed6b02685cf95af1a674519d6989d5780fc2d09dd /sys/ufs
parent79cfd4b63b4ca477163c700b67bbbff7a0b9c5e7 (diff)
downloadsrc-6d967351b4dc23909e569bee7b6bea72e8dfc0c0.tar.gz
src-6d967351b4dc23909e569bee7b6bea72e8dfc0c0.zip
Keep comments consistent with the code. Minor optimization.
Sponsored by: DARPA & NAI Labs.
Notes
Notes: svn path=/head/; revision=108017
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index 994e8d358c45..d64e4f2fca9d 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -984,19 +984,14 @@ mapacct_ufs1(vp, oldblkp, lastblkp, fs, lblkno, expungetype)
struct inode *ip;
ino_t inum;
- /*
- * We only care about the leaf block numbers, not the
- * meta-block numbers.
- */
- if (lblkno == -1)
- return (0);
ip = VTOI(vp);
inum = ip->i_number;
for ( ; oldblkp < lastblkp; oldblkp++, lblkno++) {
blkno = *oldblkp;
if (blkno == 0 || blkno == BLK_NOCOPY)
continue;
- if (expungetype == BLK_SNAP && blkno != BLK_SNAP)
+ if (lblkno != -1 && expungetype == BLK_SNAP &&
+ blkno != BLK_SNAP)
*ip->i_snapblklist++ = lblkno;
if (blkno == BLK_SNAP)
blkno = blkstofrags(fs, lblkno);
@@ -1260,19 +1255,14 @@ mapacct_ufs2(vp, oldblkp, lastblkp, fs, lblkno, expungetype)
struct inode *ip;
ino_t inum;
- /*
- * We only care about the leaf block numbers, not the
- * meta-block numbers.
- */
- if (lblkno == -1)
- return (0);
ip = VTOI(vp);
inum = ip->i_number;
for ( ; oldblkp < lastblkp; oldblkp++, lblkno++) {
blkno = *oldblkp;
if (blkno == 0 || blkno == BLK_NOCOPY)
continue;
- if (expungetype == BLK_SNAP && blkno != BLK_SNAP)
+ if (lblkno != -1 && expungetype == BLK_SNAP &&
+ blkno != BLK_SNAP)
*ip->i_snapblklist++ = lblkno;
if (blkno == BLK_SNAP)
blkno = blkstofrags(fs, lblkno);