diff options
author | Tor Egge <tegge@FreeBSD.org> | 2006-05-15 22:52:22 +0000 |
---|---|---|
committer | Tor Egge <tegge@FreeBSD.org> | 2006-05-15 22:52:22 +0000 |
commit | ebb78f64c7016914f3310f904126ae56d747f92c (patch) | |
tree | a082640ff86488ee9bc5098f8eb534e5d64ad3f4 /sys | |
parent | e4dfa7fd7877d089b652416085198c7c736d97ba (diff) | |
download | src-ebb78f64c7016914f3310f904126ae56d747f92c.tar.gz src-ebb78f64c7016914f3310f904126ae56d747f92c.zip |
Errors detected while file system is suspended should not trigger an
assertion failure.
Notes
Notes:
svn path=/head/; revision=158632
Diffstat (limited to 'sys')
-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 c8dcdcdb97ed..2b5bf1c26a9f 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. */ |