From 5a0f59d05147ee32e10d8db606c6da17d4099721 Mon Sep 17 00:00:00 2001 From: Arshad Hussain Date: Fri, 1 Sep 2023 10:07:56 +0530 Subject: [PATCH] LU-17000 misc: Fix Unused Value error(0) 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 Change-Id: I509592ddc9b8fa3e9a6a7dcef4e476ad4fc9d9fc Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52216 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Timothy Day Reviewed-by: Oleg Drokin --- lustre/quota/lquota_disk.c | 1 - lustre/utils/libmount_utils_zfs.c | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lustre/quota/lquota_disk.c b/lustre/quota/lquota_disk.c index ac1b220..c00611d 100644 --- a/lustre/quota/lquota_disk.c +++ b/lustre/quota/lquota_disk.c @@ -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); diff --git a/lustre/utils/libmount_utils_zfs.c b/lustre/utils/libmount_utils_zfs.c index 2fdc0b6..7f63cda 100644 --- a/lustre/utils/libmount_utils_zfs.c +++ b/lustre/utils/libmount_utils_zfs.c @@ -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++) { -- 1.8.3.1