Do not traverse list of snapshots if there isn't one.

Found by:	scottl
This commit is contained in:
phk 2004-09-16 17:28:56 +00:00
parent 287d9abd93
commit d90d8244cd

View File

@ -1563,6 +1563,10 @@ ffs_snapblkfree(fs, devvp, bno, size, inum)
retry:
VI_LOCK(devvp);
sn = devvp->v_rdev->si_snapdata;
if (sn == NULL) {
VI_UNLOCK(devvp);
return (0);
}
TAILQ_FOREACH(ip, &sn->sn_head, i_nextsnap) {
vp = ITOV(ip);
/*