lkml.org 
[lkml]   [2005]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [patch] __block_write_full_page bug
    Andrew Morton wrote:

    > Those tests for buffer_async_write(bh) are redundant now, aren't they?
    >

    Like this?

    --
    SUSE Labs, Novell Inc.
    Previous patch made buffer_async_write tests superfluous.
    As suggested by Andrew Morton.

    Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>

    Index: linux-2.6/fs/buffer.c
    ===================================================================
    --- linux-2.6.orig/fs/buffer.c 2005-04-25 13:14:52.000000000 +1000
    +++ linux-2.6/fs/buffer.c 2005-04-27 11:00:01.000000000 +1000
    @@ -1843,8 +1843,8 @@ static int __block_write_full_page(struc

    for (nr_underway = 0; nr_underway < idx; nr_underway++) {
    bh = arr[nr_underway];
    - if (buffer_async_write(bh))
    - submit_bh(WRITE, bh);
    + BUG_ON(!buffer_async_write(bh));
    + submit_bh(WRITE, bh);
    put_bh(bh);
    }

    @@ -1904,10 +1904,9 @@ recover:
    unlock_page(page);
    for (nr_underway = 0; nr_underway < idx; nr_underway++) {
    bh = arr[nr_underway];
    - if (buffer_async_write(bh)) {
    - clear_buffer_dirty(bh);
    - submit_bh(WRITE, bh);
    - }
    + BUG_ON(!buffer_async_write(bh));
    + clear_buffer_dirty(bh);
    + submit_bh(WRITE, bh);
    put_bh(bh);
    }
    goto done;
    \
     
     \ /
      Last update: 2005-04-27 03:06    [W:0.023 / U:0.668 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site