[dm-devel] [PATCH] Make it possible to set a uuid if one was not set during DM_DEV_CREATE.

Alasdair G Kergon agk at redhat.com
Fri Oct 15 15:11:01 UTC 2010


Peter Rajnoha tested this this morning and 'dmsetup remove' hung.

On Fri, Oct 08, 2010 at 01:53:43PM -0400, Peter Jones wrote:
> +	if (param->flags & DM_NEW_UUID_FLAG) {
> +		/*
> +		 * Does this device already have a uuid?
> +		 */
> +		if (hc->uuid) {
> +			DMWARN("asked to change uuid of device with uuid "
> +			       "already set %s %s -> %s",
> +			       param->name, hc->uuid, param->uuid);

It's missing dm_put(hd->md) here.

> +			up_write(&_hash_lock);
> +			kfree(new_data);
> +			return ERR_PTR(-EINVAL);

Alasdair




More information about the dm-devel mailing list