Commit a7b287bf authored by Israel Rukshin's avatar Israel Rukshin Committed by Jason Gunthorpe

IB/iser: Refactor iscsi_iser_check_protection function

Reduce lines of code by using local variable.
Signed-off-by: default avatarIsrael Rukshin <israelr@mellanox.com>
Reviewed-by: default avatarMax Gurtovoy <maxg@mellanox.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent a188339c
...@@ -406,13 +406,10 @@ static u8 ...@@ -406,13 +406,10 @@ static u8
iscsi_iser_check_protection(struct iscsi_task *task, sector_t *sector) iscsi_iser_check_protection(struct iscsi_task *task, sector_t *sector)
{ {
struct iscsi_iser_task *iser_task = task->dd_data; struct iscsi_iser_task *iser_task = task->dd_data;
enum iser_data_dir dir = iser_task->dir[ISER_DIR_IN] ?
ISER_DIR_IN : ISER_DIR_OUT;
if (iser_task->dir[ISER_DIR_IN]) return iser_check_task_pi_status(iser_task, dir, sector);
return iser_check_task_pi_status(iser_task, ISER_DIR_IN,
sector);
else
return iser_check_task_pi_status(iser_task, ISER_DIR_OUT,
sector);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment