[2/2] ploop: Remove excess variable

Submitted by Kirill Tkhai on March 21, 2019, 10:14 a.m.

Details

Message ID 155316329266.18087.7785265934775544279.stgit@localhost.localdomain
State New
Series "Series without cover letter"
Headers show

Commit Message

Kirill Tkhai March 21, 2019, 10:14 a.m.
We may use saved_ioc to differ the case, when we need
to put io context. We do not need duplicated variable
for that.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/block/ploop/dev.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index f8b9b0bcba78..1d6ee2329bb9 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -2565,7 +2565,6 @@  static void ploop_req_state_process(struct ploop_request * preq)
 	struct ploop_device * plo = preq->plo;
 	struct ploop_delta * top_delta;
 	struct io_context * saved_ioc = NULL;
-	int release_ioc = 0;
 #ifdef CONFIG_BEANCOUNTERS
 	struct user_beancounter *saved_ub = NULL;
 #endif
@@ -2576,7 +2575,6 @@  static void ploop_req_state_process(struct ploop_request * preq)
 		saved_ioc = current->io_context;
 		current->io_context = preq->ioc;
 		atomic_long_inc(&preq->ioc->refcount);
-		release_ioc = 1;
 	}
 #ifdef CONFIG_BEANCOUNTERS
 	WARN_ONCE(!preq->preq_ub,
@@ -2908,7 +2906,7 @@  static void ploop_req_state_process(struct ploop_request * preq)
 		BUG();
 	}
 out:
-	if (release_ioc) {
+	if (saved_ioc) {
 		struct io_context * ioc = current->io_context;
 		current->io_context = saved_ioc;
 		put_io_context(ioc);