Whamcloud - gitweb
LU-17000 misc: Fix Unused Value error(0) 16/52216/5
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Fri, 1 Sep 2023 04:37:56 +0000 (10:07 +0530)
committerOleg Drokin <green@whamcloud.com>
Wed, 25 Oct 2023 18:07:13 +0000 (18:07 +0000)
This patch fixes unused value error reported
by coverity run.

CoverityID: 397913 ("Unused value"): lquota_disk.c
CoverityID: 397912 ("Unused value"): libmount_utils_zfs.c

Test-Parameters: trivial fstype=zfs testlist=sanity-quota,conf-sanity,sanity
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I509592ddc9b8fa3e9a6a7dcef4e476ad4fc9d9fc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52216
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/quota/lquota_disk.c
lustre/utils/libmount_utils_zfs.c

index ac1b220..c00611d 100644 (file)
@@ -819,7 +819,6 @@ int lquota_disk_write_glb(const struct lu_env *env, struct dt_object *obj,
                        if (rc)
                                GOTO(out_lock, rc);
                }
-               rc = 0;
        }
 
        rc = dt_insert(env, obj, (struct dt_rec *)rec, key, th);
index 2fdc0b6..7f63cda 100644 (file)
@@ -329,8 +329,13 @@ int zfs_write_ldd(struct mkfs_opts *mop)
 
        vprint("Writing %s properties\n", ds);
 
-       if (mop->mo_flags & MO_ERASE_ALL)
+       if (mop->mo_flags & MO_ERASE_ALL) {
                ret = zfs_erase_allprops(zhp);
+               if (ret < 0) {
+                       fprintf(stderr, "zfs_erase_allprops Failed: %d\n", ret);
+                       goto out_close;
+               }
+       }
        ret = zfs_set_prop_params(zhp, ldd->ldd_params);
 
        for (i = 0; special_ldd_prop_params[i].zlpb_prop_name != NULL; i++) {