[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211223123003.6947-1-lukas.bulwahn@gmail.com>
Date: Thu, 23 Dec 2021 13:30:03 +0100
From: Lukas Bulwahn <lukas.bulwahn@...il.com>
To: Christoph Hellwig <hch@....de>, Jens Axboe <axboe@...nel.dk>,
Jan Kara <jack@...e.cz>, linux-block@...r.kernel.org
Cc: Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
llvm@...ts.linux.dev, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org,
Lukas Bulwahn <lukas.bulwahn@...il.com>
Subject: [PATCH] block: drop needless assignment in set_task_ioprio()
Commit 5fc11eebb4a9 ("block: open code create_task_io_context in
set_task_ioprio") introduces a needless assignment
'ioc = task->io_context', as the local variable ioc is not further
used before returning.
Even after the further fix, commit a957b61254a7 ("block: fix error in
handling dead task for ioprio setting"), the assignment still remains
needless.
Drop this needless assignment in set_task_ioprio().
This code smell was identified with 'make clang-analyzer'.
Fixes: 5fc11eebb4a9 ("block: open code create_task_io_context in set_task_ioprio")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@...il.com>
---
block/blk-ioc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 71c3a933cf16..8c99e1771c9c 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -286,7 +286,6 @@ int set_task_ioprio(struct task_struct *task, int ioprio)
}
if (task->io_context) {
kmem_cache_free(iocontext_cachep, ioc);
- ioc = task->io_context;
} else {
task->io_context = ioc;
}
--
2.17.1
Powered by blists - more mailing lists