projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mm/rmap: map_pte() was not handling private ZONE_DEVICE page properly
[linux-2.6-block.git]
/
mm
/
zswap.c
diff --git
a/mm/zswap.c
b/mm/zswap.c
index 7d34e69507e305adec0a64b5e272626385f9d651..cd91fd9d96b814d145e378b573dd289fb501e64e 100644
(file)
--- a/
mm/zswap.c
+++ b/
mm/zswap.c
@@
-1026,6
+1026,15
@@
static int zswap_frontswap_store(unsigned type, pgoff_t offset,
ret = -ENOMEM;
goto reject;
}
+
+ /* A second zswap_is_full() check after
+ * zswap_shrink() to make sure it's now
+ * under the max_pool_percent
+ */
+ if (zswap_is_full()) {
+ ret = -ENOMEM;
+ goto reject;
+ }
}
/* allocate entry */