summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Koenig <jk@jk.fr.eu.org>2010-08-21 09:25:27 +0000
committerJeremie Koenig <jk@jk.fr.eu.org>2010-08-30 14:19:08 +0200
commit7eff83acaac2167ffdc7a297a0ed6a78354aa062 (patch)
treea3b60d39250ed15b925d27fe53ef6c8e980dc162
parent5baed27bd3b7a7d20ecb77068546b158d131fc1c (diff)
Handle the ref counter spinlock on cleanup
* netfs.c (netfs_node_norefs): Handle the reference counters spinlock so as to avoid deadlocking on reentry.
-rw-r--r--netfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/netfs.c b/netfs.c
index 6b105f91..e98af752 100644
--- a/netfs.c
+++ b/netfs.c
@@ -163,8 +163,12 @@ error_t netfs_attempt_lookup (struct iouser *user, struct node *dir,
free all its associated storage. */
void netfs_node_norefs (struct node *np)
{
+ spin_unlock (&netfs_node_refcnt_lock);
+
procfs_cleanup (np);
free (np);
+
+ spin_lock (&netfs_node_refcnt_lock);
}