From 74d2cc667de43f5909ee5e5b434ace38b249a397 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 15 Feb 1996 21:58:59 +0000 Subject: (diskfs_nput): It's not valid to touch *NP (by `mutex_unlock (&np->lock);') after we have called diskfs_drop_node. So don't do it in that case. --- libdiskfs/diskfs.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libdiskfs/diskfs.h') diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index c7a3c4a4..3f4690c5 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -616,10 +616,13 @@ diskfs_nput (struct node *np) /* Now we can drop the reference back... */ goto loop; } + mutex_unlock (&np->lock); } else - spin_unlock (&diskfs_node_refcnt_lock); - mutex_unlock (&np->lock); + { + spin_unlock (&diskfs_node_refcnt_lock); + mutex_unlock (&np->lock); + } } /* Release a hard reference on NP. If NP is locked by anyone, then -- cgit v1.2.3