lkml.org 
[lkml]   [2010]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 19/21] Hibernation: Prepare for handle.cur removal
    Date
    Prepare for the removal of handle.cur by stopping using
    it in get_swap_reader.

    Signed-off-by: Nigel Cunningham <nigel@tuxonice.net>
    ---
    kernel/power/block_io.c | 10 +++++-----
    1 files changed, 5 insertions(+), 5 deletions(-)

    diff --git a/kernel/power/block_io.c b/kernel/power/block_io.c
    index c71c7c3..dd71ef2 100644
    --- a/kernel/power/block_io.c
    +++ b/kernel/power/block_io.c
    @@ -276,29 +276,29 @@ int get_swap_reader(unsigned int *flags_p, sector_t first_page)
    if (!handle.cur)
    return -ENOMEM;

    - error = hib_bio_read_page(first_page, handle.cur, 1);
    + error = hib_prepare_buffer();
    if (error) {
    release_swap_reader();
    return error;
    }

    - error = hib_prepare_buffer();
    + /* Bootstrap reading the extents */
    + error = hib_bio_read_page(first_page, hib_ppio_buffer, 1);
    if (error) {
    release_swap_reader();
    + hib_free_buffer();
    return error;
    }

    handle.k = 0;

    - /* Bootstrap reading the extents */
    - memcpy(hib_ppio_buffer, handle.cur, PAGE_SIZE);
    error = hib_extents_load(&sector_extents, 1);

    if (error) {
    release_swap_reader();
    - return error;
    }

    + hib_free_buffer();
    return error;
    }

    --
    1.7.0.4


    \
     
     \ /
      Last update: 2010-06-02 14:25    [W:0.021 / U:61.880 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site