• Andrew Morton's avatar
    [PATCH] jbd needs to wait for locked buffers · 4d4f4cc4
    Andrew Morton authored
    From: Chris Mason <mason@suse.com>
    
    jbd needs to wait for any io to complete on the buffer before changing the
    end_io function.  Using set_buffer_locked means that it can change the
    end_io function while the page is in the middle of writeback, and the
    writeback bit on the page will never get cleared.
    
    Since we set the buffer dirty earlier on, if the page was previously dirty,
    pdflush or memory pressure might trigger a writepage call, which will race
    with jbd's set_buffer_locked.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    4d4f4cc4
commit.c 23.5 KB