linux/fs/jbd2
Mingming Cao 530576bbf3 jbd2: fix race between jbd2_journal_try_to_free_buffers() and jbd2 commit transaction
journal_try_to_free_buffers() could race with jbd commit transaction
when the later is holding the buffer reference while waiting for the
data buffer to flush to disk. If the caller of
journal_try_to_free_buffers() request tries hard to release the buffers,
it will treat the failure as error and return back to the caller. We
have seen the directo IO failed due to this race.  Some of the caller of
releasepage() also expecting the buffer to be dropped when passed with
GFP_KERNEL mask to the releasepage()->journal_try_to_free_buffers().

With this patch, if the caller is passing the GFP_KERNEL to indicating
this call could wait, in case of try_to_free_buffers() failed, let's
waiting for journal_commit_transaction() to finish commit the current
committing transaction , then try to free those buffers again with
journal locked.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Reviewed-by: Badari Pulavarty <pbadari@us.ibm.com> 
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-07-13 21:06:39 -04:00
..
Makefile
checkpoint.c spinlock: lockbreak cleanup 2008-01-30 13:31:20 +01:00
commit.c jbd2: Add commit time into the commit block 2008-07-11 19:27:31 -04:00
journal.c Fix misuses of bdevname() 2008-05-13 08:02:26 -07:00
recovery.c jbd2: If a journal checksum error is detected, propagate the error to ext4 2008-06-06 17:50:40 -04:00
revoke.c jdb2: replace remaining __FUNCTION__ occurrences 2008-04-17 10:38:59 -04:00
transaction.c jbd2: fix race between jbd2_journal_try_to_free_buffers() and jbd2 commit transaction 2008-07-13 21:06:39 -04:00