[Devel] [PATCH] fix of shmem oops

Mishin Dmitry dim at sw.ru
Fri Dec 9 02:44:50 PST 2005


Patch from Dmitry (dim@):
 - fixed race between dput_recursive and generic_shutdown_super on root
   dentry.
   Bug #55453

-- 
Thanks,
Dmitry.
-------------- next part --------------
--- ./fs/dcache.c.shrinkroot	2005-12-05 12:01:57.000000000 +0300
+++ ./fs/dcache.c	2005-12-08 15:33:44.000000000 +0300
@@ -129,14 +129,11 @@ DECLARE_WAIT_QUEUE_HEAD(dcache_shrinker_
 static void dcache_shrinker_add(struct dcache_shrinker *ds,
 		struct dentry *parent, struct dentry *dentry)
 {
-	if (parent != dentry) {
-		struct super_block *sb;
+	struct super_block *sb;
 
-		sb = parent->d_sb;
-		ds->dentry = parent;
-		list_add(&ds->list, &sb->s_dshrinkers);
-	} else
-		INIT_LIST_HEAD(&ds->list);
+	sb = parent->d_sb;
+	ds->dentry = parent;
+	list_add(&ds->list, &sb->s_dshrinkers);
 }
 
 /* called under dcache_lock */


More information about the Devel mailing list