Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1480880
| From | Minfei Huang <mnghuan@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] dm: Return correct value in retry loop |
| Date | 2016-09-12 03:40 +0200 |
| Message-ID | <sgoo2-5bR-9@gated-at.bofh.it> (permalink) |
| References | <sekHU-8tW-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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)
>
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH] dm: Return correct value in retry loop Minfei Huang <mnghuan@gmail.com> - 2016-09-12 03:40 +0200 Re: dm: Return correct value in retry loop Mike Snitzer <snitzer@redhat.com> - 2016-09-12 17:10 +0200
csiph-web