Re: [PATCH] md.c:didn't unlock the mddev before return EINVAL in array_size_store

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 10, 2017 at 02:15:55PM +0800, Zhilong Liu wrote:
> md.c: it needs to release the mddev lock before
> the array_size_store() returns.

applied, thanks!
 
> Signed-off-by: Zhilong Liu <zlliu@xxxxxxxx>
> ---
>  drivers/md/md.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index f6ae1d6..5327236 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -4843,8 +4843,10 @@ array_size_store(struct mddev *mddev, const char *buf, size_t len)
>  		return err;
>  
>  	/* cluster raid doesn't support change array_sectors */
> -	if (mddev_is_clustered(mddev))
> +	if (mddev_is_clustered(mddev)) {
> +		mddev_unlock(mddev);
>  		return -EINVAL;
> +	}
>  
>  	if (strncmp(buf, "default", 7) == 0) {
>  		if (mddev->pers)
> -- 
> 2.6.6
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux