]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: move the nr_phys_segments assert into scsi_init_io
authorChristoph Hellwig <hch@lst.de>
Sat, 28 Jun 2014 09:51:01 +0000 (11:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Jun 2017 12:03:21 +0000 (14:03 +0200)
commitcf8ec2cf8d05900c8322942da7635e1386b502a3
tree69a3398cb1e798a6031e37d42b8d1a875f466871
parentb3ffb4cb387985c8572f49478a822abf8125f53c
scsi: move the nr_phys_segments assert into scsi_init_io

commit 635d98b1d0cfc2ba3426a701725d31a6102c059a upstream.

scsi_init_io should only be called for requests that transfer data,
so move the assert that a request has segments from the callers into
scsi_init_io.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/scsi/scsi_lib.c