Jan Kara
4407c2b6b2
[PATCH] Fix race in do_get_write_access()
...
attached patch should fix the following race:
Proc 1 Proc 2
__flush_batch()
ll_rw_block()
do_get_write_access()
lock_buffer
jh is only waiting for checkpoint
-> b_transaction == NULL ->
do nothing
unlock_buffer
test_set_buffer_locked()
test_clear_buffer_dirty()
__journal_file_buffer()
change the data
submit_bh()
and we have sent wrong data to disk... We now clean the dirty buffer flag
under buffer lock in all cases and hence we know that whenever a buffer is
starting to be journaled we either finish the pending write-out before
attaching a buffer to a transaction or we won't write the buffer until the
transaction is going to be committed.
The test in jbd_unexpected_dirty_buffer() is redundant - remove it.
Furthermore we have to clear the buffer dirty bit under the buffer lock to
prevent races with buffer write-out (and hence prevent returning a buffer with
IO happening).
Signed-off-by: Jan Kara <jack@suse.cz >
Signed-off-by: Andrew Morton <akpm@osdl.org >
Signed-off-by: Linus Torvalds <torvalds@osdl.org >
2005-09-07 16:57:57 -07:00
..
2005-08-20 17:20:28 +01:00
2005-04-16 15:20:36 -07:00
2005-08-19 18:08:21 -07:00
2005-08-19 18:02:56 -07:00
2005-08-19 18:08:21 -07:00
2005-08-20 13:20:01 -07:00
2005-04-16 15:20:36 -07:00
2005-09-07 16:57:46 -07:00
2005-06-20 15:15:11 -07:00
2005-09-07 16:57:33 -07:00
2005-06-23 09:45:20 -07:00
2005-08-19 18:08:21 -07:00
2005-09-05 00:05:52 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-09-07 16:57:23 -07:00
2005-09-07 16:57:23 -07:00
2005-09-07 16:57:26 -07:00
2005-09-07 16:57:46 -07:00
2005-09-07 16:57:50 -07:00
2005-09-07 16:57:56 -07:00
2005-09-07 16:57:42 -07:00
2005-04-16 15:20:36 -07:00
2005-08-26 11:39:19 -07:00
2005-06-21 18:46:16 -07:00
2005-08-06 09:42:06 -07:00
2005-09-07 16:57:57 -07:00
2005-09-07 16:57:29 -07:00
2005-09-07 16:57:29 -07:00
2005-09-07 16:57:23 -07:00
2005-07-13 11:25:24 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-25 16:25:04 -07:00
2005-08-19 18:44:56 -07:00
2005-08-16 08:52:11 -07:00
2005-09-07 16:57:25 -07:00
2005-05-05 16:36:47 -07:00
2005-08-16 19:42:56 +01:00
2005-04-16 15:20:36 -07:00
2005-06-25 16:24:59 -07:00
2005-09-07 16:57:43 -07:00
2005-06-24 14:14:24 -07:00
2005-04-16 15:20:36 -07:00
2005-09-07 16:57:56 -07:00
2005-09-07 16:57:18 -07:00
2005-04-16 15:20:36 -07:00
2005-08-29 15:41:54 -07:00
2005-08-26 19:37:13 -07:00
2005-08-19 18:08:21 -07:00
2005-06-30 08:45:11 -07:00
2005-09-07 16:57:56 -07:00
2005-04-16 15:20:36 -07:00
2005-08-19 18:08:21 -07:00
2005-09-05 00:06:21 -07:00
2005-07-12 20:38:38 -07:00
2005-05-05 16:36:47 -07:00
2005-06-21 18:46:16 -07:00
2005-04-16 15:20:36 -07:00
2005-06-21 18:46:16 -07:00
2005-04-16 15:20:36 -07:00
2005-09-02 00:57:31 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-09-07 16:57:20 -07:00
2005-06-23 09:45:32 -07:00
2005-09-07 16:57:55 -07:00
2005-07-12 16:01:02 -07:00
2005-04-16 15:20:36 -07:00
2005-09-07 16:57:43 -07:00
2005-08-08 11:53:47 -07:00
2005-07-07 18:23:52 -07:00
2005-06-24 00:05:19 -07:00
2005-04-16 15:20:36 -07:00
2005-06-25 16:25:11 -07:00
2005-06-23 09:45:30 -07:00
2005-07-12 16:01:01 -07:00
2005-07-27 16:26:06 -07:00
2005-04-16 15:20:36 -07:00
2005-09-07 16:57:32 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-06-23 09:45:27 -07:00
2005-09-07 16:57:31 -07:00
2005-09-07 16:57:39 -07:00
2005-04-16 15:20:36 -07:00
2005-08-20 18:51:29 -07:00
2005-09-07 16:57:29 -07:00
2005-04-16 15:20:36 -07:00
2005-06-25 16:24:38 -07:00
2005-07-27 16:26:06 -07:00
2005-09-07 16:57:18 -07:00
2005-07-27 16:26:07 -07:00
2005-06-04 17:12:59 -07:00
2005-09-07 16:57:42 -07:00
2005-09-07 16:57:33 -07:00
2005-04-16 15:20:36 -07:00
2005-09-07 16:57:43 -07:00
2005-09-07 16:57:35 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:25:47 -07:00
2005-06-23 09:45:27 -07:00
2005-09-07 16:57:32 -07:00
2005-04-16 15:20:36 -07:00
2005-05-05 16:36:47 -07:00
2005-05-01 08:59:26 -07:00
2005-04-16 15:20:36 -07:00
2005-07-07 18:23:52 -07:00
2005-04-16 15:20:36 -07:00
2005-09-07 16:57:27 -07:00