summaryrefslogtreecommitdiff
path: root/libdiskfs/diskfs.h
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-02-08 03:42:15 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-02-08 03:42:15 +0000
commit984240d8a5ace79efdd3b955a57c7821c1e6033b (patch)
treeccae4a44a317dea891e09638ade961f4b57815d2 /libdiskfs/diskfs.h
parent4cfb138288db3bf1a98de6e7e18a55187afe4c81 (diff)
(diskfs_nput): Before bumping NP->references (which precedes
diskfs_try_dropping_softrefs), *lock* diskfs_node_refcnt_lock, not mutant unlock. (diskfs_nrele): Likewise.
Diffstat (limited to 'libdiskfs/diskfs.h')
-rw-r--r--libdiskfs/diskfs.h4
1 files changed, 2 insertions, 2 deletions
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);