diff options
author | Mingming Cao <cmm@us.ibm.com> | 2008-07-13 21:06:39 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-07-13 21:06:39 -0400 |
commit | 530576bbf379fc45cfb34f246257d8526db44567 (patch) | |
tree | d4a89bf6f2736816e1b43abfdafcf2d61bbd19ef /net/802 | |
parent | 772cb7c83ba256a11c7bf99a11bef3858d23767c (diff) | |
download | kernel_samsung_aries-530576bbf379fc45cfb34f246257d8526db44567.zip kernel_samsung_aries-530576bbf379fc45cfb34f246257d8526db44567.tar.gz kernel_samsung_aries-530576bbf379fc45cfb34f246257d8526db44567.tar.bz2 |
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>
Diffstat (limited to 'net/802')
0 files changed, 0 insertions, 0 deletions