mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
block: Add BIO_PAGE_PINNED and associated infrastructure
Add BIO_PAGE_PINNED to indicate that the pages in a bio are pinned (FOLL_PIN) and that the pin will need removing. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: John Hubbard <jhubbard@nvidia.com> cc: Al Viro <viro@zeniv.linux.org.uk> cc: Jens Axboe <axboe@kernel.dk> cc: Jan Kara <jack@suse.cz> cc: Matthew Wilcox <willy@infradead.org> cc: Logan Gunthorpe <logang@deltatee.com> cc: linux-block@vger.kernel.org Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20230522205744.2825689-5-dhowells@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
e51bab4e20
commit
fd363244e8
@@ -488,7 +488,8 @@ void zero_fill_bio(struct bio *bio);
|
||||
|
||||
static inline void bio_release_pages(struct bio *bio, bool mark_dirty)
|
||||
{
|
||||
if (bio_flagged(bio, BIO_PAGE_REFFED))
|
||||
if (bio_flagged(bio, BIO_PAGE_REFFED) ||
|
||||
bio_flagged(bio, BIO_PAGE_PINNED))
|
||||
__bio_release_pages(bio, mark_dirty);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user