Andrew Morton wrote:This is exactly the solution I proposed earlier (to check buffer_mapped() before calling submit_bh()).
On Thu, 12 Oct 2006 14:28:20 +0200I'm testing with something like this now; seem sane?
Jan Kara <jack@xxxxxxx> wrote:
Where can we callblock_write_full_page() will unlock the page, so ext3_writepage()
journal_dirty_data() without PageLock?
will run journal_dirty_data_fn() against an unlocked page.
I haven't looked into the exact details of the race, but it should
be addressable via jbd_lock_bh_state() or j_list_lock coverage
journal_dirty_data & journal_unmap_data both check do jbd_lock_bh_state(bh) close to the top... journal_dirty_data_fn has checked buffer_mapped before getting into journal_dirty_data, but that state may
change before the lock is grabbed. Similarly re-check after we drop the lock.