lkml.org 
[lkml]   [2023]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [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;
}
\
 
 \ /
  Last update: 2023-03-26 23:41    [W:0.034 / U:1.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site