mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Keep comments consistent with the code. Minor optimization.
Sponsored by: DARPA & NAI Labs.
This commit is contained in:
parent
79cfd4b63b
commit
6d967351b4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108017
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user