summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache
diff options
context:
space:
mode:
authorGirjesh Rajoria <grajoria@redhat.com>2017-11-03 00:41:24 +0530
committerAmar Tumballi <amarts@redhat.com>2017-11-03 17:17:17 +0000
commit782f6a5d6035ed282ffe4b3e1d38bfa4c771aca9 (patch)
treee0c8412c48bc3f7088b16a157b85222578ac92e8 /xlators/performance/io-cache
parent55071ba2ce8e8c978d938bde0a1fcb16cea695c6 (diff)
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 <grajoria@redhat.com>
Diffstat (limited to 'xlators/performance/io-cache')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c8
1 files changed, 0 insertions, 8 deletions
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: