diff options
author | trasz <trasz@FreeBSD.org> | 2012-10-28 18:53:28 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2012-10-28 18:53:28 +0000 |
commit | ba83fef729262f13c5393cfdc78c5e6e85700e89 (patch) | |
tree | a8274741ab2a30beb688f6a32bf3541d5b26f826 /sys/ufs | |
parent | 94c194db6e072c66e7e87c451f028af69ea94216 (diff) | |
download | FreeBSD-src-ba83fef729262f13c5393cfdc78c5e6e85700e89.zip FreeBSD-src-ba83fef729262f13c5393cfdc78c5e6e85700e89.tar.gz |
Fix two problems that caused instant panic when the device mounted
with softupdates went away. Note that this does not fix the problem
entirely; I'm committing it now to make it easier for someone to pick
up the work.
Reviewed by: mckusick
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index c14af04..b410820 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -13342,8 +13342,13 @@ softdep_deallocate_dependencies(bp) if ((bp->b_ioflags & BIO_ERROR) == 0) panic("softdep_deallocate_dependencies: dangling deps"); - softdep_error(bp->b_vp->v_mount->mnt_stat.f_mntonname, bp->b_error); - panic("softdep_deallocate_dependencies: unrecovered I/O error"); + if (bp->b_vp != NULL && bp->b_vp->v_mount != NULL) + softdep_error(bp->b_vp->v_mount->mnt_stat.f_mntonname, bp->b_error); + else + printf("softdep_deallocate_dependencies: " + "got error %d while accessing filesystem\n", bp->b_error); + if (bp->b_error != ENXIO) + panic("softdep_deallocate_dependencies: unrecovered I/O error"); } /* |