summaryrefslogtreecommitdiffstats
path: root/include/vdso
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2020-11-20 10:55:16 +0900
committerJens Axboe <axboe@kernel.dk>2020-12-07 17:36:03 -0700
commit49c7089f3ded981fcea387f853fa394788e60fb2 (patch)
tree32f6627c5425a895fbe528cf6b4398a46dbb2f19 /include/vdso
parent2e8c6e0e1d2d65562c637940747cfa30559f976a (diff)
downloadlinux-49c7089f3ded981fcea387f853fa394788e60fb2.tar.bz2
null_blk: cleanup discard handling
null_handle_discard() is called from both null_handle_rq() and null_handle_bio(). As these functions are only passed a nullb_cmd structure, this forces pointer dereferences to identiify the discard operation code and to access the sector range to be discarded. Simplify all this by changing the interface of the functions null_handle_discard() and null_handle_memory_backed() to pass along the operation code, operation start sector and number of sectors. With this change null_handle_discard() can be called directly from null_handle_memory_backed(). Also add a message warning that the discard configuration attribute has no effect when memory backing is disabled. No functional change is introduced by this patch. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/vdso')
0 files changed, 0 insertions, 0 deletions