lkml.org 
[lkml]   [2011]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 2/7] fs: block_page_mkwrite should wait for writeback to finish
    From
    Date
    For filesystems such as nilfs2 and xfs that use block_page_mkwrite, modify that
    function to wait for pending writeback before allowing the page to become
    writable. This is needed to stabilize pages during writeback for those two
    filesystems.

    Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
    ---
    fs/buffer.c | 1 +
    1 files changed, 1 insertions(+), 0 deletions(-)


    diff --git a/fs/buffer.c b/fs/buffer.c
    index a08bb8e..cf9a795 100644
    --- a/fs/buffer.c
    +++ b/fs/buffer.c
    @@ -2361,6 +2361,7 @@ block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
    if (!ret)
    ret = block_commit_write(page, 0, end);

    + wait_on_page_writeback(page);
    if (unlikely(ret)) {
    unlock_page(page);
    if (ret == -ENOMEM)


    \
     
     \ /
      Last update: 2011-05-10 01:07    [W:0.046 / U:151.884 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site