mirror of
https://github.com/gluster/glusterfs.git
synced 2026-02-05 06:47:35 +01:00
glusterd: fixing coverity issues
In the last patch merge for the performance.readdir -ahead dependencies, there was few issues with return check and NULL derefencing. So, fixed that as per the coverity scanner. CID: 1432493 CID: 1432492 Updates: #1060 Change-Id: I6dee6d35ef41ab8d6322f1b2e3734c4796ee2804 Signed-off-by: nik-redhat <nladha@redhat.com>
This commit is contained in:
committed by
MOHIT AGRAWAL
parent
e96bb6d806
commit
4bd4d1ce6e
@@ -3359,16 +3359,22 @@ volgen_link_bricks(volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
|
||||
if ((i % sub_count) == 0) {
|
||||
xl = volgen_graph_add_nolink(graph, xl_type, xl_namefmt, volname,
|
||||
j);
|
||||
if (strncmp(xl_type, "performance/readdir-ahead",
|
||||
SLEN("performance/readdir-ahead")) == 0)
|
||||
xlator_set_fixed_option(xl, "performance.readdir-ahead", "on");
|
||||
j++;
|
||||
}
|
||||
|
||||
if (!xl) {
|
||||
ret = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (strncmp(xl_type, "performance/readdir-ahead",
|
||||
SLEN("performance/readdir-ahead")) == 0) {
|
||||
ret = xlator_set_fixed_option(xl, "performance.readdir-ahead",
|
||||
"on");
|
||||
if (ret)
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = volgen_xlator_link(xl, trav);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user