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    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site