]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
block: Add invalidate_disk() helper to invalidate the gendisk
authorXie Yongji <xieyongji@bytedance.com>
Wed, 22 Sep 2021 12:37:08 +0000 (20:37 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Oct 2021 16:12:41 +0000 (10:12 -0600)
commitf059a1d2e23a165bf86e33673c6a7535a08c6341
treec009d3e5c96d7848902627704c613bb324156dd4
parente94f68527a35271131cdf9d3fb4eb3c2513dc3d0
block: Add invalidate_disk() helper to invalidate the gendisk

To hide internal implementation and simplify some driver code,
this adds a helper to invalidate the gendisk. It will clean the
gendisk's associated buffer/page caches and reset its internal
states.

Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210922123711.187-2-xieyongji@bytedance.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c
include/linux/genhd.h