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

Re: [lvm-devel] [PATCH] Remove LOCK_KEEP and READ_CHECK_EXISTENCE from vgsplit.



Dave Wysochanski wrote:
> diff --git a/tools/vgsplit.c b/tools/vgsplit.c
> index 9cd90b8..0dc5bc4 100644
> --- a/tools/vgsplit.c
> +++ b/tools/vgsplit.c
> @@ -342,11 +342,12 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
>  		existing_vg = 1;
>  		vg_to = vg_read_for_update(cmd, vg_name_to, NULL,
>  					   READ_REQUIRE_RESIZEABLE |
> -					   LOCK_NONBLOCKING | LOCK_KEEP |
> -					   READ_CHECK_EXISTENCE);
> +					   LOCK_NONBLOCKING);
>  
> -		if (vg_read_error(vg_to))
> -			goto_bad;
> +		if (vg_read_error(vg_to)) {

	but vg_name_to is locked by vg_lock_newname() previously?
	so unlock_and_release here?

	also now code missing stack; (note goto_bad before)

> +			vg_release(vg_to);
> +			goto bad2;
> +		}
>  


Milan


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