diff mbox series

[v3,09/10] block: export bio_release_pages and bio_iov_iter_get_pages

Message ID 20200327165012.34443-10-johannes.thumshirn@wdc.com (mailing list archive)
State Superseded
Headers show
Series Introduce Zone Append for writing to zoned block devices | expand

Commit Message

Johannes Thumshirn March 27, 2020, 4:50 p.m. UTC
Export bio_release_pages and bio_iov_iter_get_pages, so it can be used
from modular code.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 block/bio.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Christoph Hellwig March 27, 2020, 5:07 p.m. UTC | #1
On Sat, Mar 28, 2020 at 01:50:11AM +0900, Johannes Thumshirn wrote:
> +EXPORT_SYMBOL(bio_release_pages);
>  
>  static int __bio_iov_bvec_add_pages(struct bio *bio, struct iov_iter *iter)
>  {
> @@ -1111,6 +1112,7 @@ int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
>  		bio_set_flag(bio, BIO_NO_PAGE_REF);
>  	return bio->bi_vcnt ? 0 : ret;
>  }
> +EXPORT_SYMBOL(bio_iov_iter_get_pages);

EXPORT_SYMBOL_GPL, please.
Johannes Thumshirn March 27, 2020, 5:13 p.m. UTC | #2
On 27/03/2020 18:07, Christoph Hellwig wrote:
> On Sat, Mar 28, 2020 at 01:50:11AM +0900, Johannes Thumshirn wrote:
>> +EXPORT_SYMBOL(bio_release_pages);
>>   
>>   static int __bio_iov_bvec_add_pages(struct bio *bio, struct iov_iter *iter)
>>   {
>> @@ -1111,6 +1112,7 @@ int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
>>   		bio_set_flag(bio, BIO_NO_PAGE_REF);
>>   	return bio->bi_vcnt ? 0 : ret;
>>   }
>> +EXPORT_SYMBOL(bio_iov_iter_get_pages);
> 
> EXPORT_SYMBOL_GPL, please.
> 

Sure, only for bio_iov_iter_get_pages or bio_release_pages as well?

I couldn't find a clear pattern in block/bio.c, it's _GPL 7 times vs 28 
times without _GPL.
Christoph Hellwig March 27, 2020, 5:22 p.m. UTC | #3
On Fri, Mar 27, 2020 at 05:13:55PM +0000, Johannes Thumshirn wrote:
> On 27/03/2020 18:07, Christoph Hellwig wrote:
> > On Sat, Mar 28, 2020 at 01:50:11AM +0900, Johannes Thumshirn wrote:
> >> +EXPORT_SYMBOL(bio_release_pages);
> >>   
> >>   static int __bio_iov_bvec_add_pages(struct bio *bio, struct iov_iter *iter)
> >>   {
> >> @@ -1111,6 +1112,7 @@ int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
> >>   		bio_set_flag(bio, BIO_NO_PAGE_REF);
> >>   	return bio->bi_vcnt ? 0 : ret;
> >>   }
> >> +EXPORT_SYMBOL(bio_iov_iter_get_pages);
> > 
> > EXPORT_SYMBOL_GPL, please.
> > 
> 
> Sure, only for bio_iov_iter_get_pages or bio_release_pages as well?
> 
> I couldn't find a clear pattern in block/bio.c, it's _GPL 7 times vs 28 
> times without _GPL.

Both.  All the new internal stuff should be _GPL.
diff mbox series

Patch

diff --git a/block/bio.c b/block/bio.c
index aee214db92d3..023ad8bd26c7 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -998,6 +998,7 @@  void bio_release_pages(struct bio *bio, bool mark_dirty)
 		put_page(bvec->bv_page);
 	}
 }
+EXPORT_SYMBOL(bio_release_pages);
 
 static int __bio_iov_bvec_add_pages(struct bio *bio, struct iov_iter *iter)
 {
@@ -1111,6 +1112,7 @@  int bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)
 		bio_set_flag(bio, BIO_NO_PAGE_REF);
 	return bio->bi_vcnt ? 0 : ret;
 }
+EXPORT_SYMBOL(bio_iov_iter_get_pages);
 
 static void submit_bio_wait_endio(struct bio *bio)
 {