Re: [PATCH v4 2/2] block: unpin user pages belonging to a folio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 05, 2024 at 10:22:11PM +0100, Matthew Wilcox wrote:
> Why can't we have ...
> 
> 		bio_release_folio(bio, fi.folio, nr_pages);
> 
> which is implemented as:
> 
> static inline void bio_release_page(struct bio *bio, struct folio *folio, unsigned long nr_pages)
> {
> 	if (bio_flagged(bio, BIO_PAGE_PINNED))
> 		gup_put_folio(folio, nr_pages, FOLL_PIN);
> }
> 
> Sure, we'd need to make gup_put_folio() unstatic, but this seems far
> more sensible.

Yes.  Although maybe a unpin_user_folio wrapper that hides the FOLL_PIN
which we're trying to keep private would be the slightly nicer variant.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux