From: David Allan Date: Wed, 6 Jan 2010 16:53:15 +0000 (+0100) Subject: Don't update vol details after build X-Git-Tag: v0.7.6~233 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c06eb18c37b8fcbf160d464fa5f1aa74e0056ef;p=thirdparty%2Flibvirt.git Don't update vol details after build This patch removes the call to vol update after the volume build completes. The update call is currently meaningless anyway because the vol build is passed a copy of the definition, so the update result is thrown away. More importantly, if the user specified a selinux label for the volume, the update call results in a double free of the label * src/storage/storage_backend_fs.c: remove the update call --- diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index b7d4bd6d93..4fe40b379d 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -822,14 +822,6 @@ _virStorageBackendFileSystemVolBuild(virConnectPtr conn, return -1; } - /* Refresh allocation / permissions info, but not capacity */ - if (virStorageBackendUpdateVolTargetInfoFD(conn, &vol->target, fd, - &vol->allocation, - NULL) < 0) { - close(fd); - return -1; - } - if (close(fd) < 0) { virReportSystemError(conn, errno, _("cannot close file '%s'"),