Skip to contentSkip to conversation

Fix missing dm_put()

PATCH New Peter Jones 1 participant 1 message Oct 18, 2010 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix missing dm_put()

The change to make UUID setable after map creation was missing one dm_put() call; this patch adds it.

---
 drivers/md/dm-ioctl.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/md/dm-ioctl.c +1 -0
index 22c2e22..e2d106b 100644
@@ -351,6 +351,7 @@ static struct mapped_device *dm_hash_rename(struct dm_ioctl *param,
 			DMWARN("Unable to change uuid of device, %s because "
 			       "uuid is already set to %s",
 			       param->name, hc->uuid);
+			dm_put(hd->md);
 			up_write(&_hash_lock);
 			kfree(new_data);
 			return ERR_PTR(-EINVAL);
Signature · 1 line
1.7.2.2