Messages in this thread Patch in this message | | | From | "Rafael J. Wysocki" <> | Date | Fri, 13 Jan 2023 21:14:15 +0100 | Subject | Re: [PATCH] kernel: power: swap: Suppress expected 'Image not found' error on Ubuntu |
| |
On Thu, Dec 15, 2022 at 7:20 AM Shradha Gupta <shradhagupta@linux.microsoft.com> wrote: > > In 'systemctl hibernate' if resume device is written to the sysfs > resume parameter, a software_resume() call is triggerred. This call > is expected to fail in swsusp_check() call with -EBUSY error and an > 'Image not found' error message. This fix suppresses the expected > failure message from getting logged in Ubuntu setups where > CONFIG_DYNAMIC_DEBUG is enabled by default.
I see what you mean, so what about this change instead (modulo GMail-induced white-space breakage):
--- kernel/power/swap.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
Index: linux-pm/kernel/power/swap.c =================================================================== --- linux-pm.orig/kernel/power/swap.c +++ linux-pm/kernel/power/swap.c @@ -1546,17 +1546,16 @@ int swsusp_check(void) }
put: - if (error) + if (error) { blkdev_put(hib_resume_bdev, FMODE_READ | FMODE_EXCL); - else + pr_debug("Image not found (code %d)\n", error); + } else { pr_debug("Image signature found, resuming\n"); + } } else { error = PTR_ERR(hib_resume_bdev); }
- if (error) - pr_debug("Image not found (code %d)\n", error); - return error; }
| |