summaryrefslogtreecommitdiff
path: root/nova/virt/disk/mount/api.py
diff options
context:
space:
mode:
authorArata Notsu <notsu@virtualtech.jp>2013-02-19 20:59:20 +0900
committerArata Notsu <notsu@virtualtech.jp>2013-02-19 20:59:40 +0900
commite3fe55df23e496cee3f7b315a245ddcaaf9e8470 (patch)
treec71bebbf9479c9ddd0217f5325c7f82bb1b9b537 /nova/virt/disk/mount/api.py
parent1b9b66ba210c1dd886a95d79e5621e13fb64aa3a (diff)
Fix leak of loop/nbd devices in injection using localfs
Call do_teardown() rather than do_umount() bug 1130080 Change-Id: I0dd4e4990f75917628007fd380f7df531d9a79e5
Notes
Notes (review): Verified+2: Jenkins Approved+1: p-draigbrady <P@draigBrady.com> Code-Review+2: p-draigbrady <P@draigBrady.com> Code-Review+2: Michael Still <mikal@stillhq.com> Code-Review+1: Kurt Taylor <krtaylor@us.ibm.com> Submitted-by: Jenkins Submitted-at: Wed, 20 Feb 2013 13:38:39 +0000 Reviewed-on: https://review.openstack.org/22291 Project: openstack/nova Branch: refs/heads/master
Diffstat (limited to 'nova/virt/disk/mount/api.py')
-rw-r--r--nova/virt/disk/mount/api.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/virt/disk/mount/api.py b/nova/virt/disk/mount/api.py
index 1d9d1fc..3690f6d 100644
--- a/nova/virt/disk/mount/api.py
+++ b/nova/virt/disk/mount/api.py
@@ -211,11 +211,11 @@ class Mount(object):
211 finally: 211 finally:
212 if not status: 212 if not status:
213 LOG.debug(_("Fail to mount, tearing back down")) 213 LOG.debug(_("Fail to mount, tearing back down"))
214 self.do_umount() 214 self.do_teardown()
215 return status 215 return status
216 216
217 def do_umount(self): 217 def do_umount(self):
218 """Call the unmnt, unmap and unget operations.""" 218 """Call the unmnt operation."""
219 if self.mounted: 219 if self.mounted:
220 self.unmnt_dev() 220 self.unmnt_dev()
221 221