From 984240d8a5ace79efdd3b955a57c7821c1e6033b Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 8 Feb 1996 03:42:15 +0000 Subject: (diskfs_nput): Before bumping NP->references (which precedes diskfs_try_dropping_softrefs), *lock* diskfs_node_refcnt_lock, not mutant unlock. (diskfs_nrele): Likewise. --- libdiskfs/diskfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libdiskfs/diskfs.h') diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index 62d15776..c7a3c4a4 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -603,7 +603,7 @@ diskfs_nput (struct node *np) routine, which might result in further recursive calls to the ref-counting system. So we have to reacquire our reference around the call to forestall disaster. */ - spin_unlock (&diskfs_node_refcnt_lock); + spin_lock (&diskfs_node_refcnt_lock); np->references++; spin_unlock (&diskfs_node_refcnt_lock); @@ -649,7 +649,7 @@ diskfs_nrele (struct node *np) if (!np->dn_stat.st_nlink && !tried_drop_softrefs) { /* Same issue here as in nput; see that for explanation */ - spin_unlock (&diskfs_node_refcnt_lock); + spin_lock (&diskfs_node_refcnt_lock); np->references++; spin_unlock (&diskfs_node_refcnt_lock); -- cgit v1.2.3