diff options
author | mckusick <mckusick@FreeBSD.org> | 2004-02-23 06:56:31 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2004-02-23 06:56:31 +0000 |
commit | 5b78fad42baeaf31c104a72b496d6555ea58ede4 (patch) | |
tree | 5828b48055dca872324be80eb0fa0fc367488304 /sys/ufs | |
parent | d1dbb3b2d4e91529168d96b7d8acede795cce9af (diff) | |
download | FreeBSD-src-5b78fad42baeaf31c104a72b496d6555ea58ede4.zip FreeBSD-src-5b78fad42baeaf31c104a72b496d6555ea58ede4.tar.gz |
In the function clear_inodedeps(), a FREE_LOCK() should be called
AFTER the call to vn_start_write(), not before it. Otherwise, it is
possible to unlock it multiple times if the vn_start_write() fails.
Submitted by: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 3ebe427..b16e56d 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -5699,9 +5699,9 @@ clear_inodedeps(td) for (ino = firstino; ino <= lastino; ino++) { if (inodedep_lookup(fs, ino, 0, &inodedep) == 0) continue; - FREE_LOCK(&lk); if (vn_start_write(NULL, &mp, V_NOWAIT) != 0) continue; + FREE_LOCK(&lk); if ((error = VFS_VGET(mp, ino, LK_EXCLUSIVE, &vp)) != 0) { softdep_error("clear_inodedeps: vget", error); vn_finished_write(mp); |