From 086569ee636d91a820aa23031dda3cb74bab9505 Mon Sep 17 00:00:00 2001 From: Jeremie Koenig Date: Sat, 21 Aug 2010 09:25:27 +0000 Subject: Handle the ref counter spinlock on cleanup * netfs.c (netfs_node_norefs): Handle the reference counters spinlock so as to avoid deadlocking on reentry. --- netfs.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'netfs.c') diff --git a/netfs.c b/netfs.c index 6b105f9..e98af75 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); } -- cgit v1.2.3