mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Steve Dobbelstein" <steved@us.ibm.com>
To: dm-devel@sistina.com, Joe Thornber <thornber@sistina.com>
Cc: Linux Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [dm-devel] Re: [RFC 3/3] dm: v4 ioctl interface
Date: Wed, 2 Jul 2003 10:23:45 -0500	[thread overview]
Message-ID: <OF471CC3D2.35231415-ON85256D57.00541ED2@pok.ibm.com> (raw)


On Wednesday 02 July 2003 06:00, Joe Thornber wrote:
> dm_swap_table() will now fail for a table with no targets.
> --- diff/drivers/md/dm.c           2003-07-01 15:36:42.000000000 +0100
> +++ source/drivers/md/dm.c         2003-07-02 11:53:22.000000000 +0100
> @@ -664,10 +664,10 @@
>            md->map = t;
>
>            size = dm_table_get_size(t);
> -          set_capacity(md->disk, size);
> -          if (size == 0)
> -                      return 0;
> +          if (!size)
> +                      return -EINVAL;
>
> +          set_capacity(md->disk, size);
>            dm_table_event_callback(md->map, event_callback, md);
>
>            dm_table_get(t);
> @@ -759,8 +759,10 @@
>
>            __unbind(md);
>            r = __bind(md, table);
> -          if (r)
> +          if (r) {
> +                      up_write(&md->lock);
>                        return r;
> +          }
>
>            up_write(&md->lock);
>            return 0;

Why the "if (r)"?  Isn't this just the same as:

            __unbind(md);
            r = __bind(md, table);
            up_write(&md->lock);
            return r;

--
Steve Dobbelstein
steved@us.ibm.com
http://evms.sourceforge.net/




             reply	other threads:[~2003-07-02 15:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-02 15:23 Steve Dobbelstein [this message]
2003-07-02 15:40 ` Joe Thornber
  -- strict thread matches above, loose matches on Subject: below --
2003-07-01 14:58 [RFC] device-mapper v4 ioctl interface implementation Joe Thornber
2003-07-01 15:02 ` [RFC 3/3] dm: v4 ioctl interface Joe Thornber
2003-07-01 20:05   ` Kevin Corry
2003-07-02  8:59     ` Joe Thornber
2003-07-02 10:59       ` [dm-devel] " Joe Thornber
2003-07-02 10:59       ` Joe Thornber
2003-07-02 10:59       ` Joe Thornber
2003-07-02 11:00       ` Joe Thornber
2003-07-02 11:00       ` Joe Thornber
2003-07-02 14:17         ` Kevin Corry
2003-07-02 14:15       ` Kevin Corry

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=OF471CC3D2.35231415-ON85256D57.00541ED2@pok.ibm.com \
    --to=steved@us.ibm.com \
    --cc=dm-devel@sistina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thornber@sistina.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

all inboxes | Powered by JetHome®