Re: VFS locking & HFS problems (2.4.6pre6)

From: Andrew Morton (andrewm@uow.edu.au)
Date: Fri Jun 29 2001 - 10:52:35 EST


Benjamin Herrenschmidt wrote:
>
> I've had a deadlock twice with 2.4.6pre6 today. It's an SMP kernel
> running on an UP box (a PowerBook Pismo).
>
> The deadlock happen in the HFS filesystem in hfs_cat_put(), apparently
> (quickly looking at addresses) in spin_lock().
>

Please test this:

Index: fs/hfs/catalog.c
===================================================================
RCS file: /opt/cvs/lk/fs/hfs/catalog.c,v
retrieving revision 1.2
diff -u -r1.2 catalog.c
--- fs/hfs/catalog.c 2001/02/17 01:44:39 1.2
+++ fs/hfs/catalog.c 2001/06/29 15:54:17
@@ -549,7 +549,7 @@
                    entry->state &= ~HFS_LOCK;
                    hfs_wake_up(&entry->wait);
                 }
-
+ spin_lock(&entry_lock);
                 return entry;
         }
 
@@ -559,7 +559,6 @@
         if (grow_entries())
                 goto add_new_entry;
 
- spin_unlock(&entry_lock);
         return NULL;
 
 read_fail:
@@ -570,7 +569,6 @@
         init_entry(entry);
         list_add(&entry->list, &entry_unused);
         entries_stat.nr_free_entries++;
- spin_unlock(&entry_lock);
         return NULL;
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 30 2001 - 21:00:22 EST