]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storage: Improve virStorageBackendFileSystemStop
authorOsier Yang <jyang@redhat.com>
Wed, 21 Nov 2012 02:41:02 +0000 (10:41 +0800)
committerOsier Yang <jyang@redhat.com>
Thu, 22 Nov 2012 03:23:11 +0000 (11:23 +0800)
It's actually not used for DIR pool. So removing the checking.

src/storage/storage_backend_fs.c

index 2d175ba844636033867806f764e40ea74db73de7..4e6ebbf3117e2e7e5db0eefdd51638c26f5e8001 100644 (file)
@@ -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;