From 782f6a5d6035ed282ffe4b3e1d38bfa4c771aca9 Mon Sep 17 00:00:00 2001 From: Girjesh Rajoria Date: Fri, 3 Nov 2017 00:41:24 +0530 Subject: xlators/performance/io-cache/: DEADCODE in ioc_open_cbk Coverity ID: 173 Issue: Event dead_error_line: Execution cannot reach this statement: "fd_ctx_set(fd, this, 1UL);". Removed if block as "weight == 0U" cannot be true, so if block will never execute. Also removed weight variable because it is unused. Change-Id: I4f028df29bfde91167fb15befa99b1fe1892adc6 BUG: 789278 Signed-off-by: Girjesh Rajoria --- xlators/performance/io-cache/src/io-cache.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'xlators/performance/io-cache/src') diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index 3e2e96b3fef..2c6f9a5d8e1 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -553,7 +553,6 @@ ioc_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, ioc_local_t *local = NULL; ioc_table_t *table = NULL; ioc_inode_t *ioc_inode = NULL; - uint32_t weight = 0xffffffff; local = frame->local; if (!this || !this->private) { @@ -601,13 +600,6 @@ ioc_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, */ fd_ctx_set (fd, this, 1); } - - /* weight = 0, we disable caching on it */ - if (weight == 0) { - /* we allow a pattern-matched cache disable this way - */ - fd_ctx_set (fd, this, 1); - } } out: -- cgit