From: Osier Yang Date: Wed, 21 Nov 2012 02:41:02 +0000 (+0800) Subject: storage: Improve virStorageBackendFileSystemStop X-Git-Tag: CVE-2012-3411~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=104650db3e1656656824ff32a68759338bf716ab;p=thirdparty%2Flibvirt.git storage: Improve virStorageBackendFileSystemStop It's actually not used for DIR pool. So removing the checking. --- diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c index 2d175ba844..4e6ebbf311 100644 --- a/src/storage/storage_backend_fs.c +++ b/src/storage/storage_backend_fs.c @@ -930,7 +930,7 @@ no_memory: * @conn connection to report errors against * @pool storage pool to start * - * Stops a directory or FS based storage pool. + * Stops a FS based storage pool. * * - If it is a FS based pool, unmounts the unlying source device on the pool * - Releases all cached data about volumes @@ -940,8 +940,7 @@ static int virStorageBackendFileSystemStop(virConnectPtr conn ATTRIBUTE_UNUSED, virStoragePoolObjPtr pool) { - if (pool->def->type != VIR_STORAGE_POOL_DIR && - virStorageBackendFileSystemUnmount(pool) < 0) + if (virStorageBackendFileSystemUnmount(pool) < 0) return -1; return 0;