summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunil Kumar Acharya <sheggodu@redhat.com>2017-10-31 12:37:37 +0530
committerJeff Darcy <jeff@pl.atyp.us>2017-11-01 13:28:51 +0000
commitafa8df9ee249fac2a20f3d367dcadcee1451184e (patch)
tree573017bff10fecb73e390fa7390c7ec2a5556313
parent82be66ef8e9e3127d41a4c843daf74c1d8aec4aa (diff)
cluster/ec: FORWARD_NULL coverity fix
Problem: cbk could be NULL. Solution: Assigned appropriate value to cbk. BUG: 789278 Change-Id: I2e4bba9a54f965c6a7bccf0b0cb6c5f75399f6e6 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
-rw-r--r--xlators/cluster/ec/src/ec-common.h4
-rw-r--r--xlators/cluster/ec/src/ec-heal.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-common.h b/xlators/cluster/ec/src/ec-common.h
index e3468333cc4..9a35391a781 100644
--- a/xlators/cluster/ec/src/ec-common.h
+++ b/xlators/cluster/ec/src/ec-common.h
@@ -135,4 +135,8 @@ ec_heal_inspect (call_frame_t *frame, ec_t *ec,
ec_heal_need_t *need_heal);
int32_t
ec_get_heal_info (xlator_t *this, loc_t *loc, dict_t **dict);
+
+int32_t ec_lock_unlocked(call_frame_t *frame, void *cookie,
+ xlator_t *this, int32_t op_ret, int32_t op_errno,
+ dict_t *xdata);
#endif /* __EC_COMMON_H__ */
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c
index a75d4717228..d4beabf0682 100644
--- a/xlators/cluster/ec/src/ec-heal.c
+++ b/xlators/cluster/ec/src/ec-heal.c
@@ -170,6 +170,7 @@ void ec_heal_lock(ec_heal_t *heal, int32_t type, fd_t *fd, loc_t *loc,
} else {
ec_clear_inode_info(heal->fop, heal->fd->inode);
}
+ cbk = ec_lock_unlocked;
} else {
/* Otherwise use the callback to update size information. */
cbk = ec_heal_lock_cbk;