The patch titled Subject: zcache/tmem: Better error checking on frontswap_register_ops return value. has been added to the -mm tree. Its filename is zcache-tmem-better-error-checking-on-frontswap_register_ops-return-value.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Subject: zcache/tmem: Better error checking on frontswap_register_ops return value. In the past it either used to be NULL or the "older" backend. Now we also return -Exx error codes. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Signed-off-by: Bob Liu <lliubbo@xxxxxxxxx> Cc: Wanpeng Li <liwanp@xxxxxxxxxxxxxxxxxx> Cc: Andor Daam <andor.daam@xxxxxxxxxxxxxx> Cc: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx> Cc: Florian Schmaus <fschmaus@xxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Stefan Hengelein <ilendir@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/staging/zcache/zcache-main.c | 5 ++++- drivers/xen/tmem.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff -puN drivers/staging/zcache/zcache-main.c~zcache-tmem-better-error-checking-on-frontswap_register_ops-return-value drivers/staging/zcache/zcache-main.c --- a/drivers/staging/zcache/zcache-main.c~zcache-tmem-better-error-checking-on-frontswap_register_ops-return-value +++ a/drivers/staging/zcache/zcache-main.c @@ -1794,8 +1794,11 @@ static int __init zcache_init(void) namestr, frontswap_has_exclusive_gets, !disable_frontswap_ignore_nonactive); #endif - if (old_ops != NULL) + if (IS_ERR(old_ops) || old_ops) { + if (IS_ERR(old_ops)) + return PTR_RET(old_ops); pr_warn("%s: frontswap_ops overridden\n", namestr); + } } if (ramster_enabled) ramster_init(!disable_cleancache, !disable_frontswap, diff -puN drivers/xen/tmem.c~zcache-tmem-better-error-checking-on-frontswap_register_ops-return-value drivers/xen/tmem.c --- a/drivers/xen/tmem.c~zcache-tmem-better-error-checking-on-frontswap_register_ops-return-value +++ a/drivers/xen/tmem.c @@ -395,8 +395,11 @@ static int xen_tmem_init(void) frontswap_register_ops(&tmem_frontswap_ops); tmem_frontswap_poolid = -1; - if (old_ops) + if (IS_ERR(old_ops) || old_ops) { + if (IS_ERR(old_ops)) + return PTR_ERR(old_ops); s = " (WARNING: frontswap_ops overridden)"; + } printk(KERN_INFO "frontswap enabled, RAM provided by " "Xen Transcendent Memory%s\n", s); } _ Patches currently in -mm which might be from konrad.wilk@xxxxxxxxxx are origin.patch linux-next.patch mm-frontswap-lazy-initialization-to-allow-tmem-backends-to-build-run-as-modules.patch frontswap-make-frontswap_init-use-a-pointer-for-the-ops.patch mm-frontswap-cleanup-code.patch mm-cleancache-lazy-initialization-to-allow-tmem-backends-to-build-run-as-modules.patch cleancache-make-cleancache_init-use-a-pointer-for-the-ops.patch mm-cleancache-clean-up-cleancache_enabled.patch xen-tmem-enable-xen-tmem-shim-to-be-built-loaded-as-a-module.patch zcache-tmem-better-error-checking-on-frontswap_register_ops-return-value.patch staging-zcache-enable-ramster-to-be-built-loaded-as-a-module.patch staging-zcache-enable-zcache-to-be-built-loaded-as-a-module.patch mm-add-vm-event-counters-for-balloon-pages-compaction.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html