[libvirt] [PATCH] storage: Improve virStorageBackendFileSystemStop

Osier Yang jyang at redhat.com
Wed Nov 21 02:41:02 UTC 2012


It's actually not used for DIR pool. So removing the checking.
---
 src/storage/storage_backend_fs.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index 3322677..10daee3 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
@@ -933,7 +933,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
@@ -943,8 +943,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;
-- 
1.7.7.6




More information about the libvir-list mailing list