summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volgen.c
diff options
context:
space:
mode:
authorAshish Pandey <aspandey@redhat.com>2018-09-10 16:35:25 +0530
committerAtin Mukherjee <amukherj@redhat.com>2018-09-11 02:32:47 +0000
commit23fa1feaf0a3ab482628ab5b7b950d27e57fb46d (patch)
tree9836fa4a682cede6156f60087d7deb4a5f591ecc /xlators/mgmt/glusterd/src/glusterd-volgen.c
parent3114c4a10672a70c8964c8cfce2ca0cc1e835a9f (diff)
mgmt/glusterd : Fix coverity issue
CID: 727146, 727066 https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=85393035&defectInstanceId=26034751&mergedDefectId=727146 https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=85392913&defectInstanceId=26034571&mergedDefectId=727066 updates: bz#789278 Change-Id: Ieaef33829ec88e68690dabce4ea21d2e61dad9f6 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 33e6dc0..3e56eb3 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -1655,9 +1655,13 @@ brick_graph_add_posix (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
if (ret)
goto out;
- if (quota_enabled || pgfid_feat || trash_enabled)
- xlator_set_option (xl, "update-link-count-parent",
- "on");
+ if (quota_enabled || pgfid_feat || trash_enabled) {
+ ret = xlator_set_option (xl, "update-link-count-parent",
+ "on");
+ if (ret) {
+ goto out;
+ }
+ }
snprintf (tmpstr, sizeof (tmpstr), "%d", brickinfo->fs_share_count);
ret = xlator_set_option (xl, "shared-brick-count", tmpstr);