]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
block: pass inclusive 'lend' parameter to truncate_inode_pages_range
authorMing Lei <ming.lei@redhat.com>
Sat, 10 Feb 2018 00:46:17 +0000 (08:46 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 15 Mar 2018 13:27:42 +0000 (08:27 -0500)
commit3933ecb5e36b5cd69306063dc2a99a84e9c50577
tree5a7d9e91a1ea2a8437a11b13fd322c3049d8fe53
parentb5d69cc39be42a0a3c43e23c221f44ba1e235e64
block: pass inclusive 'lend' parameter to truncate_inode_pages_range

BugLink: http://bugs.launchpad.net/bugs/1755179
commit 0bd1ed4860d0f5f836aa8371797689a3779d1bf5 upstream.

The 'lend' parameter of truncate_inode_pages_range is required to be
inclusive, so follow the rule.

This patch fixes one memory corruption triggered by discard.

Cc: <stable@vger.kernel.org>
Cc: Dmitry Monakhov <dmonakhov@openvz.org>
Fixes: 351499a172c0 ("block: Invalidate cache on discard v2")
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
block/ioctl.c