On Wed, Sep 23, 2020 at 08:14:59PM +0200, Ján Tomko wrote:
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
Reviewed-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/storage/storage_util.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index 9171cb084f..93c24ab6bc 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -1997,7 +1997,6 @@ createFileDir(virStoragePoolObjPtr pool,
unsigned int flags)
{
virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
- int err;
virCheckFlags(0, -1);
@@ -2015,14 +2014,14 @@ createFileDir(virStoragePoolObjPtr pool,
}
- if ((err = virDirCreate(vol->target.path,
- (vol->target.perms->mode == (mode_t)-1 ?
- VIR_STORAGE_DEFAULT_VOL_PERM_MODE :
- vol->target.perms->mode),
- vol->target.perms->uid,
- vol->target.perms->gid,
- (def->type == VIR_STORAGE_POOL_NETFS
- ? VIR_DIR_CREATE_AS_UID : 0))) < 0) {
+ if (virDirCreate(vol->target.path,
+ (vol->target.perms->mode == (mode_t)-1 ?
+ VIR_STORAGE_DEFAULT_VOL_PERM_MODE :
+ vol->target.perms->mode),
+ vol->target.perms->uid,
+ vol->target.perms->gid,
+ (def->type == VIR_STORAGE_POOL_NETFS
+ ? VIR_DIR_CREATE_AS_UID : 0)) < 0) {
return -1;
}
--
2.26.2