diff options
author | tegge <tegge@FreeBSD.org> | 2006-05-15 22:52:22 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 2006-05-15 22:52:22 +0000 |
commit | e757e51d552221d5d5660b6939ee4190d1ab6d65 (patch) | |
tree | a082640ff86488ee9bc5098f8eb534e5d64ad3f4 /sys/ufs | |
parent | 988c4b7d3434cee9f6d0ed44f271493796980956 (diff) | |
download | FreeBSD-src-e757e51d552221d5d5660b6939ee4190d1ab6d65.zip FreeBSD-src-e757e51d552221d5d5660b6939ee4190d1ab6d65.tar.gz |
Errors detected while file system is suspended should not trigger an
assertion failure.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index c8dcdcd..2b5bf1c 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -215,10 +215,7 @@ ffs_snapshot(mp, snapfile) ump = VFSTOUFS(mp); fs = ump->um_fs; - /* - * XXX: make sure we don't go to out1 before we setup sn - */ - sn = (void *)0xdeadbeef; + sn = NULL; /* * Need to serialize access to snapshot code per filesystem. @@ -422,7 +419,6 @@ restart: vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); if (ip->i_effnlink == 0) { error = ENOENT; /* Snapshot file unlinked */ - sn = NULL; goto out1; } if (collectsnapstats) @@ -673,7 +669,9 @@ loop: ASSERT_VOP_LOCKED(vp, "ffs_snapshot vp"); vp->v_vflag |= VV_SYSTEM; out1: - KASSERT(sn != (void *)0xdeadbeef, ("email phk@ and mckusick@")); + KASSERT((sn != NULL && sbp != NULL && error == 0) || + (sn == NULL && sbp == NULL && error != 0), + ("email phk@ and mckusick@")); /* * Resume operation on filesystem. */ |