From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Reinecke Subject: [PATCH 6/6] libmultipath: fixup dm_rename to complete cookie on failure Date: Wed, 4 May 2016 07:57:30 +0200 Message-ID: <1462341450-5507-7-git-send-email-hare@suse.de> References: <1462341450-5507-1-git-send-email-hare@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1462341450-5507-1-git-send-email-hare@suse.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Christophe Varoqui Cc: Hannes Reinecke , dm-devel@redhat.com List-Id: dm-devel.ids >From my understanding we should be calling udev_complete() on a cookie if dm_task_set_cookie() failed. Signed-off-by: Hannes Reinecke --- libmultipath/devmapper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c index 0ae72fc..5396521 100644 --- a/libmultipath/devmapper.c +++ b/libmultipath/devmapper.c @@ -1442,8 +1442,10 @@ dm_rename (const char * old, char * new) dm_task_no_open_count(dmt); if (!dm_task_set_cookie(dmt, &cookie, - DM_UDEV_DISABLE_LIBRARY_FALLBACK)) + DM_UDEV_DISABLE_LIBRARY_FALLBACK)) { + dm_udev_complete(cookie); goto out; + } r = dm_task_run(dmt); if (!r) -- 2.6.6