OSDN Git Service

bsg-lib: initialize the bsg_job in bsg_transport_sg_io_fn
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Oct 2021 06:06:04 +0000 (08:06 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 22 Oct 2021 14:33:57 +0000 (08:33 -0600)
commit237ea1602fb4cd14cd31b745a56fd0639c58eea3
treeb319b336363722401b339f6f90bce21aac09f8da
parent8c6aabd1c72bc241c55f5b71a86cea5ef28bceca
bsg-lib: initialize the bsg_job in bsg_transport_sg_io_fn

Directly initialize the bsg_job structure instead of relying on the
->.initialize_rq_fn indirection.  This also removes the superflous
initialization of the second request used for BIDI requests.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20211021060607.264371-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bsg-lib.c