* [PATCH 8/8] mm/frontswap: add missing handle on a dup-store failure
@ 2014-01-27 10:03 Weijie Yang
0 siblings, 0 replies; only message in thread
From: Weijie Yang @ 2014-01-27 10:03 UTC (permalink / raw)
To: hughd
Cc: 'Andrew Morton', 'Minchan Kim',
shli, 'Bob Liu', weijie.yang.kh, 'Heesub Shin',
mquzik, 'Linux-MM', 'linux-kernel',
stable, xfishcoder
If a frontswap dup-store failed, it should invalidate the old page in
backend and return failure.
This patch add this missing handle. According to the comments of
__frontswap_store(), it should have been there.
Reported-by: changkun.li <xfishcoder@gmail.com>
Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
---
mm/frontswap.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mm/frontswap.c b/mm/frontswap.c
index df067f1..171c6c0 100644
--- a/mm/frontswap.c
+++ b/mm/frontswap.c
@@ -245,8 +245,10 @@ int __frontswap_store(struct page *page)
the (older) page from frontswap
*/
inc_frontswap_failed_stores();
- if (dup)
+ if (dup) {
__frontswap_clear(sis, offset);
+ frontswap_ops->invalidate_page(type, offset);
+ }
}
if (frontswap_writethrough_enabled)
/* report failure so swap also writes to swap device */
--
1.7.10.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-01-27 10:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-27 10:03 [PATCH 8/8] mm/frontswap: add missing handle on a dup-store failure Weijie Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox