All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Grow: Fix wrong 'goto' in set_new_data_offset
@ 2014-11-27 11:35 Pawel Baldysiak
  2014-12-01 22:52 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Pawel Baldysiak @ 2014-11-27 11:35 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid, pawel.baldysiak, artur.paszkiewicz

Commit a821c95f114724b38df1ea99b2858178e0ed28ce
besides introducing additional message, also changed
direct return to "goto" instruction.
'goto release' will cause routine to return with '-1',
when previously '1' was returned.
Described behaviour breaks e.g. IMSM reshape process.
This patch fixes this issue by changing 'goto' to proper one -
the one that returns '1'.

Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
---
 Grow.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Grow.c b/Grow.c
index a0f7526..6ff225a 100644
--- a/Grow.c
+++ b/Grow.c
@@ -2257,7 +2257,7 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
 			/* Metadata doesn't support data_offset changes */
 			pr_err("%s: Metadata version doesn't support"
 			       " data_offset changes\n", devname);
-			goto release;
+			goto fallback;
 		}
 		if (before > info2.space_before)
 			before = info2.space_before;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Grow: Fix wrong 'goto' in set_new_data_offset
  2014-11-27 11:35 [PATCH] Grow: Fix wrong 'goto' in set_new_data_offset Pawel Baldysiak
@ 2014-12-01 22:52 ` NeilBrown
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2014-12-01 22:52 UTC (permalink / raw)
  To: Pawel Baldysiak; +Cc: linux-raid, artur.paszkiewicz

[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]

On Thu, 27 Nov 2014 12:35:24 +0100 Pawel Baldysiak
<pawel.baldysiak@intel.com> wrote:

> Commit a821c95f114724b38df1ea99b2858178e0ed28ce
> besides introducing additional message, also changed
> direct return to "goto" instruction.
> 'goto release' will cause routine to return with '-1',
> when previously '1' was returned.
> Described behaviour breaks e.g. IMSM reshape process.
> This patch fixes this issue by changing 'goto' to proper one -
> the one that returns '1'.
> 
> Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
> ---
>  Grow.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Grow.c b/Grow.c
> index a0f7526..6ff225a 100644
> --- a/Grow.c
> +++ b/Grow.c
> @@ -2257,7 +2257,7 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st,
>  			/* Metadata doesn't support data_offset changes */
>  			pr_err("%s: Metadata version doesn't support"
>  			       " data_offset changes\n", devname);
> -			goto release;
> +			goto fallback;
>  		}
>  		if (before > info2.space_before)
>  			before = info2.space_before;

Applied, thanks.

NeilBrown

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-01 22:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-27 11:35 [PATCH] Grow: Fix wrong 'goto' in set_new_data_offset Pawel Baldysiak
2014-12-01 22:52 ` NeilBrown

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.