diff options
author | Christoph Hellwig <hch@lst.de> | 2021-11-26 13:18:00 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-11-29 06:41:29 -0700 |
commit | f3fa33acca9f0058157214800f68b10d8e71ab7a (patch) | |
tree | e4fd1c98cbce9424445c1ac61ccd2ae08afd15da /drivers/scsi/scsi_logging.c | |
parent | 79bb1dbd12005f2143670a9a4f13d91e64725717 (diff) | |
download | lwn-f3fa33acca9f0058157214800f68b10d8e71ab7a.tar.gz lwn-f3fa33acca9f0058157214800f68b10d8e71ab7a.zip |
block: remove the ->rq_disk field in struct request
Just use the disk attached to the request_queue instead.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20211126121802.2090656-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/scsi/scsi_logging.c')
-rw-r--r-- | drivers/scsi/scsi_logging.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_logging.c b/drivers/scsi/scsi_logging.c index ed9572252a42..1f8f80b2dbfc 100644 --- a/drivers/scsi/scsi_logging.c +++ b/drivers/scsi/scsi_logging.c @@ -30,7 +30,9 @@ static inline const char *scmd_name(const struct scsi_cmnd *scmd) { struct request *rq = scsi_cmd_to_rq((struct scsi_cmnd *)scmd); - return rq->rq_disk ? rq->rq_disk->disk_name : NULL; + if (!rq->q->disk) + return NULL; + return rq->q->disk->disk_name; } static size_t sdev_format_header(char *logbuf, size_t logbuf_len, |