lkml.org 
[lkml]   [2004]   [Jan]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: Linux 2.4.25-pre5
FromDavid Woodhouse <>
DateFri, 16 Jan 2004 08:58:11 +0000
On Fri, 2004-01-16 at 00:45 -0800, Andrew Morton wrote:
> Really, the init_waitqueue_head() should be done prior to putting the inode
> back into slab.

I had that version first but preferred doing it with all the other inode
initialisation in alloc_inode() rather than in destroy_inode(). If you
do it this way, you reinit even when you're about to discard the slab
pages. I don't care much though. 

===== inode.c 1.48 vs edited =====
--- 1.48/fs/inode.c	Wed Jan 14 20:51:18 2004
+++ edited/inode.c	Fri Jan 16 08:56:14 2004
@@ -127,6 +127,10 @@
 {
 	if (inode_has_buffers(inode))
 		BUG();
+	/* Reinitialise the waitqueue head because __wait_on_freeing_inode()
+	   may have left stale entries on it which it can't remove (since
+	   it knows we're freeing the inode right now */
+	init_waitqueue_head(&inode->i_wait);
 	if (inode->i_sb->s_op->destroy_inode)
 		inode->i_sb->s_op->destroy_inode(inode);
 	else
-- 
dwmw2


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:00    [W:0.634 / U:0.010 seconds]
©2003-2008 Jasper Spaans