summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/scsi/scsi_cmnd.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 162a53a39ac0..ddab0c580382 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -229,13 +229,6 @@ static inline sector_t scsi_get_sector(struct scsi_cmnd *scmd)
return blk_rq_pos(scmd->request);
}
-static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd)
-{
- unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT;
-
- return blk_rq_pos(scmd->request) >> shift;
-}
-
/*
* The operations below are hints that tell the controller driver how
* to handle I/Os with DIF or similar types of protection information.
@@ -298,6 +291,11 @@ static inline unsigned char scsi_get_prot_type(struct scsi_cmnd *scmd)
return scmd->prot_type;
}
+static inline sector_t scsi_get_lba(struct scsi_cmnd *scmd)
+{
+ return blk_rq_pos(scmd->request);
+}
+
static inline u32 scsi_prot_ref_tag(struct scsi_cmnd *scmd)
{
struct request *rq = blk_mq_rq_from_pdu(scmd);