This is a note to let you know that I've just added the patch titled Revert "scsi: core: Introduce scsi_get_sector()" to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: revert-scsi-core-introduce-scsi_get_sector.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 7d1c800e2b0e6dd0091b31f6c04b932b2b956b16 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Date: Thu, 11 Jan 2024 10:35:02 +0100 Subject: Revert "scsi: core: Introduce scsi_get_sector()" From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> This reverts commit f230e6d4249b9ccdcb571077023cecabf91ecbb1 which is commit f0f214fe8cd32224267ebea93817b8c32074623d 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@xxxxxxxxxx Reported-by: Pavel Machek <pavel@xxxxxx> Cc: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: Ming Lei <ming.lei@xxxxxxxxxx> Cc: Hannes Reinecke <hare@xxxxxxx> Cc: Damien Le Moal <damien.lemoal@xxxxxxx> Cc: Benjamin Block <bblock@xxxxxxxxxxxxx> Cc: Bart Van Assche <bvanassche@xxxxxxx> Cc: Sasha Levin <sashal@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- include/scsi/scsi_cmnd.h | 5 ----- 1 file changed, 5 deletions(-) --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -224,11 +224,6 @@ static inline int scsi_sg_copy_to_buffer buf, buflen); } -static inline sector_t scsi_get_sector(struct scsi_cmnd *scmd) -{ - return blk_rq_pos(scmd->request); -} - /* * The operations below are hints that tell the controller driver how * to handle I/Os with DIF or similar types of protection information. Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are queue-5.10/revert-scsi-core-introduce-scsi_get_sector.patch queue-5.10/scsi-core-always-send-batch-on-reset-or-error-handling-command.patch queue-5.10/revert-scsi-core-use-a-structure-member-to-track-the-scsi-command-submitter.patch queue-5.10/revert-scsi-core-always-send-batch-on-reset-or-error-handling-command.patch queue-5.10/revert-scsi-core-add-scsi_prot_ref_tag-helper.patch queue-5.10/revert-scsi-core-use-scsi_cmd_to_rq-instead-of-scsi_cmnd.request.patch queue-5.10/revert-scsi-core-make-scsi_get_lba-return-the-lba.patch