lkml.org 
[lkml]   [2010]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: Memory corruption during hibernation since 2.6.31
    Date
    > Index: linux-2.6.34.org/mm/swapfile.c
    > ===================================================================
    > --- linux-2.6.34.org.orig/mm/swapfile.c
    > +++ linux-2.6.34.org/mm/swapfile.c
    > @@ -316,7 +316,9 @@ checks:
    > scan_base = offset = si->lowest_bit;
    >
    > /* reuse swap entry of cache-only swap if not busy. */
    > - if (vm_swap_full() && si->swap_map[offset] == SWAP_HAS_CACHE) {
    > + if (vm_swap_full()
    > + && usage == SWAP_HAS_CACHE
    > + && si->swap_map[offset] == SWAP_HAS_CACHE) {
    > int swap_was_freed;
    > spin_unlock(&swap_lock);
    > swap_was_freed = __try_to_reclaim_swap(si, offset);

    Can you please add explicit commenting in the code?





    \
     
     \ /
      Last update: 2010-07-29 07:25    [W:0.020 / U:3.176 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site