Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207284
b: refs/heads/master
c: 966cca0
h: refs/heads/master
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Aug 10, 2010
1 parent e9e2904 commit 67f5ca8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 979f867191f80e74713394cf8c0a3c1b3662b648
refs/heads/master: 966cca029f739716fbcc8068b8c6dfe381f86fc3
6 changes: 4 additions & 2 deletions trunk/mm/swapfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,10 @@ static inline unsigned long scan_swap_map(struct swap_info_struct *si,
if (offset > si->highest_bit)
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) {
/* reuse swap entry of cache-only swap if not hibernation. */
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);
Expand Down

0 comments on commit 67f5ca8

Please sign in to comment.