Commit ca100571 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by openeuler-sync-bot
Browse files

Revert "scsi: core: Add scsi_prot_ref_tag() helper"

stable inclusion
from stable-v5.10.207
commit e30419672e3acc039389236d0f4e77a08b217710
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I8ZD3X
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.207&id=e30419672e3acc039389236d0f4e77a08b217710

-------------------------

This reverts commit 294d66c35a4e019a9dfe889fe382adce1cc3773e which is
commit 7ba46799 upstream.

As reported, a lot of scsi changes were made just to resolve a 2 line
patch, so let's revert them all and then manually fix up the 2 line
fixup so that things are simpler and potential abi changes are not an
issue.

Link: https://lore.kernel.org/r/ZZ042FejzwMM5vDW@duo.ucw.cz


Reported-by: default avatarPavel Machek <pavel@ucw.cz>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Benjamin Block <bblock@linux.ibm.com>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLi Lingfeng <lilingfeng3@huawei.com>
(cherry picked from commit 5e8bbb49)
parent 5465843b
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -291,13 +291,6 @@ 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);

	return t10_pi_ref_tag(rq);
}

static inline unsigned int scsi_prot_interval(struct scsi_cmnd *scmd)
{
	return scmd->device->sector_size;