mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Signed-off-by: Bob Liu <[email protected]> Cc: Wanpeng Li <[email protected]> Cc: Andor Daam <[email protected]> Cc: Dan Magenheimer <[email protected]> Cc: Florian Schmaus <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Stefan Hengelein <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
10a7a07713
commit
f42158fe67
2 changed files with 8 additions and 2 deletions
|
|
@ -397,8 +397,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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue