git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drivers: dma-coherent: Account dma_pfn_offset when used with device tree
[sfrench/cifs-2.6.git]
/
mm
/
swap_cgroup.c
diff --git
a/mm/swap_cgroup.c
b/mm/swap_cgroup.c
index ac6318a064d35e6dcc5385d1dc8062ff6e46554c..3405b4ee1757e3deb196c93e49b9641dad8d56fb 100644
(file)
--- a/
mm/swap_cgroup.c
+++ b/
mm/swap_cgroup.c
@@
-48,6
+48,9
@@
static int swap_cgroup_prepare(int type)
if (!page)
goto not_enough_page;
ctrl->map[idx] = page;
if (!page)
goto not_enough_page;
ctrl->map[idx] = page;
+
+ if (!(idx % SWAP_CLUSTER_MAX))
+ cond_resched();
}
return 0;
not_enough_page:
}
return 0;
not_enough_page: