[PATCH] Fix JBD race in t_forget list handling
authorJan Kara <jack@suse.cz>
Tue, 6 Sep 2005 22:19:09 +0000 (15:19 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:54 +0000 (16:57 -0700)
commite6c9f5c1888097c936334bf9740024520ca47b8e
tree6fcf2cccb7e4d155dd663f10001efdb2a9d7daae
parentcbf0d27a131639f4f3e4faa94373c5c6f89f8f07
[PATCH] Fix JBD race in t_forget list handling

Fix race between journal_commit_transaction() and other places as
journal_unmap_buffer() that are adding buffers to transaction's t_forget list.
 We have to protect against such places by holding j_list_lock even when
traversing the t_forget list.  The fact that other places can only add buffers
to the list makes the locking easier.  OTOH the lock ranking complicates the
stuff...

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/jbd/commit.c