summaryrefslogtreecommitdiff
path: root/lib/debugobjects.c
diff options
context:
space:
mode:
authorLogan Gunthorpe <logang@deltatee.com>2020-10-17 01:19:05 +0300
committerChristoph Hellwig <hch@lst.de>2020-10-22 16:28:02 +0300
commit5e063101ffacf7c14797f5185c58a967ca83c79f (patch)
tree9dd5d8300c7ec5af92fe15492027363d6ed7f370 /lib/debugobjects.c
parentdf06047d54276f73782c9d97882b305fca745d3f (diff)
downloadlinux-5e063101ffacf7c14797f5185c58a967ca83c79f.tar.xz
nvmet: cleanup nvmet_passthru_map_sg()
Clean up some confusing elements of nvmet_passthru_map_sg() by returning early if the request is greater than the maximum bio size. This allows us to drop the sg_cnt variable. This should not result in any functional change but makes the code clearer and more understandable. The original code allocated a truncated bio then would return EINVAL when bio_add_pc_page() filled that bio. The new code just returns EINVAL early if this would happen. Fixes: c1fef73f793b ("nvmet: add passthru code to process commands") Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Suggested-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Cc: Christoph Hellwig <hch@lst.de> Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions