From 7810142e6c8d07c61423b2184dd20679e841f91b Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 15 Oct 2010 13:16:48 -0400 Subject: [PATCH] Fix missing dm_put(). There's an error path that fails to call dm_put(), which means bad things happen. This patch adds the dm_put() call. --- dm-allow-setting-of-uuid-via-rename-if-not-already-set.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dm-allow-setting-of-uuid-via-rename-if-not-already-set.patch b/dm-allow-setting-of-uuid-via-rename-if-not-already-set.patch index ba5d45354..fd0f1af41 100644 --- a/dm-allow-setting-of-uuid-via-rename-if-not-already-set.patch +++ b/dm-allow-setting-of-uuid-via-rename-if-not-already-set.patch @@ -62,7 +62,7 @@ index bb6bdc8..d102269 100644 return -EBUSY; } -@@ -329,22 +334,45 @@ static int dm_hash_rename(uint32_t cookie, uint32_t *flags, const char *old, +@@ -329,22 +334,46 @@ static int dm_hash_rename(uint32_t cookie, uint32_t *flags, const char *old, */ hc = __get_name_cell(old); if (!hc) { @@ -92,6 +92,7 @@ index bb6bdc8..d102269 100644 + DMWARN("Unable to change uuid of device, %s because " + "uuid is already set to %s", + old, hc->uuid); ++ dm_put(hc->md); + up_write(&_hash_lock); + kfree(new_data); + return -EINVAL;