From: Minfei Huang <mnghuan@gmail.com>
To: agk@redhat.com, snitzer@redhat.com, shli@kernel.org
Cc: dm-devel@redhat.com, linux-raid@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dm: Return correct value in retry loop
Date: Mon, 12 Sep 2016 09:39:06 +0800 [thread overview]
Message-ID: <20160912013906.GA24268@MinfeideMacBook-Pro.local> (raw)
In-Reply-To: <1473148829-3317-1-git-send-email-mnghuan@gmail.com>
Ping.
Any comment is appreciate.
Thanks
Minfei
On 09/06/16 at 04:00P, Minfei Huang wrote:
> dm_resume will return sliently in retry loop's failure. Assign a correct
> return value in the failed loop.
>
> Remove a useless assignment as well.
>
> Signed-off-by: Minfei Huang <mnghuan@gmail.com>
> ---
> drivers/md/dm.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/md/dm.c b/drivers/md/dm.c
> index fa9b1cb..c935cc8 100644
> --- a/drivers/md/dm.c
> +++ b/drivers/md/dm.c
> @@ -2249,10 +2249,11 @@ static int __dm_resume(struct mapped_device *md, struct dm_table *map)
>
> int dm_resume(struct mapped_device *md)
> {
> - int r = -EINVAL;
> + int r;
> struct dm_table *map = NULL;
>
> retry:
> + r = -EINVAL;
> mutex_lock_nested(&md->suspend_lock, SINGLE_DEPTH_NESTING);
>
> if (!dm_suspended_md(md))
> @@ -2277,10 +2278,8 @@ retry:
>
> clear_bit(DMF_SUSPENDED, &md->flags);
>
> - r = 0;
> out:
> mutex_unlock(&md->suspend_lock);
> -
> return r;
> }
>
> --
> 2.7.4 (Apple Git-66)
>
next prev parent reply other threads:[~2016-09-12 1:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 8:00 [PATCH] dm: Return correct value in retry loop Minfei Huang
2016-09-12 1:39 ` Minfei Huang [this message]
2016-09-12 15:01 ` Mike Snitzer
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=20160912013906.GA24268@MinfeideMacBook-Pro.local \
--to=mnghuan@gmail.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=shli@kernel.org \
--cc=snitzer@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).