All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kumar amit mehta <gmate.amit@gmail.com>
To: Akira Hayakawa <ruby.wktk@gmail.com>
Cc: dm-devel@redhat.com
Subject: Re: [PATCH] dm-lc.c: Audit return values of functions invoked in module init routine
Date: Tue, 30 Jul 2013 22:53:45 -0400	[thread overview]
Message-ID: <20130731025345.GA25441@gmail.com> (raw)
In-Reply-To: <51F8C650.4080200@gmail.com>

On Wed, Jul 31, 2013 at 05:09:52PM +0900, Akira Hayakawa wrote:
> What if registering lc_mgr_target failed
> after registering lc_target succeeded?
> I think we should unregister the lc_target in this case.
> Am I wrong?

You are correct. I'll make the changes.

> Looking for some code samples,
> dm-snap.c and dm-thin.c have more than two targets to register
> like dm-lc does.
> 
> Below is a code fragment from dm-snap.c .
> It treats each failure in registering targets
> independently with different labels.
> 
> // dm-snap.c
> bad_exception_cache:
>         exit_origin_hash();
> bad_origin_hash:
>         dm_unregister_target(&merge_target);
> bad_register_merge_target:
>         dm_unregister_target(&origin_target);
> bad_register_origin_target:
>         dm_unregister_target(&snapshot_target);
> bad_register_snapshot_target:
>         dm_exception_store_exit();
> 
>         return r;

Thank you for your feedback and the pointers, I'll resend the patch.

!!amit

      reply	other threads:[~2013-07-31  2:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-30 19:29 [PATCH] dm-lc.c: Audit return values of functions invoked in module init routine Kumar Amit Mehta
2013-07-31  8:09 ` Akira Hayakawa
2013-07-31  2:53   ` Kumar amit mehta [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=20130731025345.GA25441@gmail.com \
    --to=gmate.amit@gmail.com \
    --cc=dm-devel@redhat.com \
    --cc=ruby.wktk@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.