login
Header Space

 
 

Re: posix_lock_deadlocks() hang

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Cc: <matthew@...>, <linux-fsdevel@...>, Andrew Morton <akpm@...>
Date: Monday, September 13, 2004 - 8:55 pm

On Mon, Sep 13, 2004 at 03:25:41PM -0500, Stuart_Hayes@Dell.com wrote:

Matthew, actually ...


flocks aren't supposed to be on the blocked list in the first place.
I'm not sure how this hasn't been noticed before.  The correct patch
would be something like (compile-tested only):

Index: linux-2.6/fs/locks.c
===================================================================
RCS file: /var/cvs/linux-2.6/fs/locks.c,v
retrieving revision 1.12
diff -u -p -r1.12 locks.c
--- linux-2.6/fs/locks.c	13 Aug 2004 14:30:02 -0000	1.12
+++ linux-2.6/fs/locks.c	14 Sep 2004 00:54:13 -0000
@@ -459,7 +459,8 @@ static void locks_insert_block(struct fi
 	}
 	list_add_tail(&waiter->fl_block, &blocker->fl_block);
 	waiter->fl_next = blocker;
-	list_add(&waiter->fl_link, &blocked_list);
+	if (IS_POSIX(blocker))
+		list_add(&waiter->fl_link, &blocked_list);
 }
 
 /* Wake up processes blocked waiting for blocker.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
posix_lock_deadlocks() hang, , (Mon Sep 13, 4:25 pm)
Re: posix_lock_deadlocks() hang, Jeremy Allison, (Tue Sep 14, 3:09 pm)
Re: posix_lock_deadlocks() hang, Stephen Rothwell, (Tue Sep 14, 7:23 pm)
Re: posix_lock_deadlocks() hang, Matthew Wilcox, (Mon Sep 13, 8:55 pm)
speck-geostationary