Message ID | 1430415151-30948-4-git-send-email-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Apr 30 2015 at 1:32pm -0400, Christoph Hellwig <hch@lst.de> wrote: > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > drivers/md/dm-mpath.c | 20 +++++++++----------- > 1 file changed, 9 insertions(+), 11 deletions(-) > > diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c > index 9fb91ca..f6d40d3 100644 > --- a/drivers/md/dm-mpath.c > +++ b/drivers/md/dm-mpath.c > @@ -591,9 +591,7 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps > kfree(m->hw_handler_params); > m->hw_handler_params = NULL; > } > - } > - > - if (m->hw_handler_name) { > + } else if (m->hw_handler_name) { > /* > * Increments scsi_dh reference, even when using an > * already-attached handler. > @@ -604,15 +602,15 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps > dm_put_device(ti, p->path.dev); > goto bad; > } > + } > > - if (m->hw_handler_params) { > - r = scsi_dh_set_params(q, m->hw_handler_params); > - if (r < 0) { > - ti->error = "unable to set hardware " > - "handler parameters"; > - dm_put_device(ti, p->path.dev); > - goto bad; > - } > + if (m->hw_handler_name && m->hw_handler_params) { > + r = scsi_dh_set_params(q, m->hw_handler_params); > + if (r < 0) { > + ti->error = "unable to set hardware " > + "handler parameters"; > + dm_put_device(ti, p->path.dev); > + goto bad; > } > } > Would prefer to see the old weird error message line wrapping fixed up to be on a single line (80 cols be damned). Acked-by: Mike Snitzer <snitzer@redhat.com> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 04/30/2015 07:32 PM, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Cheers, Hannes
>>>>> "Christoph" == Christoph Hellwig <hch@lst.de> writes:
+ } else if (m->hw_handler_name) {
/*
* Increments scsi_dh reference, even when using an
* already-attached handler.
Shouldn't this comment be updated to reflect your previous patch?
On Fri, May 01, 2015 at 11:34:25AM -0400, Martin K. Petersen wrote: > + } else if (m->hw_handler_name) { > /* > * Increments scsi_dh reference, even when using an > * already-attached handler. > > Shouldn't this comment be updated to reflect your previous patch? Yes, it should. I'll fix it for the resend. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 9fb91ca..f6d40d3 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -591,9 +591,7 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps kfree(m->hw_handler_params); m->hw_handler_params = NULL; } - } - - if (m->hw_handler_name) { + } else if (m->hw_handler_name) { /* * Increments scsi_dh reference, even when using an * already-attached handler. @@ -604,15 +602,15 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps dm_put_device(ti, p->path.dev); goto bad; } + } - if (m->hw_handler_params) { - r = scsi_dh_set_params(q, m->hw_handler_params); - if (r < 0) { - ti->error = "unable to set hardware " - "handler parameters"; - dm_put_device(ti, p->path.dev); - goto bad; - } + if (m->hw_handler_name && m->hw_handler_params) { + r = scsi_dh_set_params(q, m->hw_handler_params); + if (r < 0) { + ti->error = "unable to set hardware " + "handler parameters"; + dm_put_device(ti, p->path.dev); + goto bad; } }
Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/md/dm-mpath.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)