]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
lib/scatterlist: Introduce sgl_alloc() and sgl_free()
authorBart Van Assche <bart.vanassche@wdc.com>
Fri, 5 Jan 2018 16:26:46 +0000 (08:26 -0800)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:11 +0000 (13:16 +0100)
commit2b08897b51adb81fbde110872d1aee7da4a2f7b9
tree5ee6926b217e945896b422fffefc7868cc4e32e0
parentdd8694fd3dbdc67ce1ed0533bb918cbbc7cfaabd
lib/scatterlist: Introduce sgl_alloc() and sgl_free()

BugLink: https://bugs.launchpad.net/bugs/1853519
commit e80a0af4759a164214f02da157a3800753ce135f upstream.

Many kernel drivers contain code that allocates and frees both a
scatterlist and the pages that populate that scatterlist.
Introduce functions in lib/scatterlist.c that perform these tasks
instead of duplicating this functionality in multiple drivers.
Only include these functions in the build if CONFIG_SGL_ALLOC=y
to avoid that the kernel size increases if this functionality is
not used.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/linux/scatterlist.h
lib/Kconfig
lib/scatterlist.c