From afa8df9ee249fac2a20f3d367dcadcee1451184e Mon Sep 17 00:00:00 2001 From: Sunil Kumar Acharya Date: Tue, 31 Oct 2017 12:37:37 +0530 Subject: 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 --- xlators/cluster/ec/src/ec-common.h | 4 ++++ xlators/cluster/ec/src/ec-heal.c | 1 + 2 files changed, 5 insertions(+) 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; -- cgit