From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>
Subject: Re: [PATCH] PM: fix to earlier patch adding PM_RESTORE notifiers
Date: Mon, 5 Nov 2007 22:07:05 +0100 [thread overview]
Message-ID: <200711052207.06307.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0711051536330.2800-100000@iolanthe.rowland.org>
On Monday, 5 of November 2007, Alan Stern wrote:
> This patch (as1007) fixes a mistake in the patch adding the PM RESTORE
> notifiers. The PM_POST_RESTORE notifier should be called if an error
> occurs in the PM_RESTORE_PREPARE notifications.
Ah, I see.
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
>
> ---
>
> Rafael:
>
> Len may prefer to merge this with the earlier patch rather than keeping
> the two separate. It's a very small update.
Yes. I think I'll merge the two and send the result as the next revision of
the previous patch.
Greetings,
Rafael
> Index: usb-2.6/kernel/power/disk.c
> ===================================================================
> --- usb-2.6.orig/kernel/power/disk.c
> +++ usb-2.6/kernel/power/disk.c
> @@ -491,7 +491,7 @@ static int software_resume(void)
>
> error = pm_notifier_call_chain(PM_RESTORE_PREPARE);
> if (error)
> - goto Exit;
> + goto Finish;
>
> error = create_basic_memory_bitmaps();
> if (error)
> @@ -517,7 +517,6 @@ static int software_resume(void)
> free_basic_memory_bitmaps();
> Finish:
> pm_notifier_call_chain(PM_POST_RESTORE);
> - Exit:
> atomic_inc(&snapshot_device_available);
> /* For success case, the suspend path will release the lock */
> Unlock:
> Index: usb-2.6/kernel/power/user.c
> ===================================================================
> --- usb-2.6.orig/kernel/power/user.c
> +++ usb-2.6/kernel/power/user.c
> @@ -66,10 +66,14 @@ static int snapshot_open(struct inode *i
> swap_type_of(swsusp_resume_device, 0, NULL) : -1;
> data->mode = O_RDONLY;
> error = pm_notifier_call_chain(PM_RESTORE_PREPARE);
> + if (error)
> + pm_notifier_call_chain(PM_POST_RESTORE);
> } else {
> data->swap = -1;
> data->mode = O_WRONLY;
> error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE);
> + if (error)
> + pm_notifier_call_chain(PM_POST_HIBERNATION);
> }
> if (error) {
> atomic_inc(&snapshot_device_available);
>
>
>
--
"Premature optimization is the root of all evil." - Donald Knuth
prev parent reply other threads:[~2007-11-05 21:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-05 20:39 [PATCH] PM: fix to earlier patch adding PM_RESTORE notifiers Alan Stern
2007-11-05 21:07 ` Rafael J. Wysocki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200711052207.06307.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-pm@lists.linux-foundation.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox