linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block: export disk_part_iter_* helpers
@ 2021-03-26 12:10 yanfei.xu
  2021-03-26 12:13 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: yanfei.xu @ 2021-03-26 12:10 UTC (permalink / raw)
  To: hch, axboe; +Cc: linux-block, linux-kernel

From: Yanfei Xu <yanfei.xu@windriver.com>

disk_part_iter_* helpers might be used by other external modules, like
lttng-modules. But it was unexport in 'commit bc359d03c7ec ("block: add
a disk_uevent helper")'. Here export them again.

Signed-off-by: Yanfei Xu <yanfei.xu@windriver.com>
---
 block/genhd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/block/genhd.c b/block/genhd.c
index 8c8f543572e6..4eac897baffe 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -183,6 +183,7 @@ void disk_part_iter_init(struct disk_part_iter *piter, struct gendisk *disk,
 		piter->idx = 1;
 	piter->flags = flags;
 }
+EXPORT_SYMBOL_GPL(disk_part_iter_init);
 
 /**
  * disk_part_iter_next - proceed iterator to the next partition and return it
@@ -219,6 +220,7 @@ struct block_device *disk_part_iter_next(struct disk_part_iter *piter)
 
 	return piter->part;
 }
+EXPORT_SYMBOL_GPL(disk_part_iter_next);
 
 /**
  * disk_part_iter_exit - finish up partition iteration
@@ -235,6 +237,7 @@ void disk_part_iter_exit(struct disk_part_iter *piter)
 		bdput(piter->part);
 	piter->part = NULL;
 }
+EXPORT_SYMBOL_GPL(disk_part_iter_exit);
 
 /*
  * Can be deleted altogether. Later.
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: export disk_part_iter_* helpers
  2021-03-26 12:10 [PATCH] block: export disk_part_iter_* helpers yanfei.xu
@ 2021-03-26 12:13 ` Christoph Hellwig
  2021-03-26 13:01   ` Xu, Yanfei
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2021-03-26 12:13 UTC (permalink / raw)
  To: yanfei.xu; +Cc: hch, axboe, linux-block, linux-kernel

On Fri, Mar 26, 2021 at 08:10:59PM +0800, yanfei.xu@windriver.com wrote:
> From: Yanfei Xu <yanfei.xu@windriver.com>
> 
> disk_part_iter_* helpers might be used by other external modules, like
> lttng-modules. But it was unexport in 'commit bc359d03c7ec ("block: add
> a disk_uevent helper")'. Here export them again.

Err, no.  We never export things for out of tree modules.  And any kind
of driver code has absolutely no business looking at the partition tables
to start with, modular or not.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] block: export disk_part_iter_* helpers
  2021-03-26 12:13 ` Christoph Hellwig
@ 2021-03-26 13:01   ` Xu, Yanfei
  0 siblings, 0 replies; 3+ messages in thread
From: Xu, Yanfei @ 2021-03-26 13:01 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: axboe, linux-block, linux-kernel



On 3/26/21 8:13 PM, Christoph Hellwig wrote:
> [Please note: This e-mail is from an EXTERNAL e-mail address]
> 
> On Fri, Mar 26, 2021 at 08:10:59PM +0800, yanfei.xu@windriver.com wrote:
>> From: Yanfei Xu <yanfei.xu@windriver.com>
>>
>> disk_part_iter_* helpers might be used by other external modules, like
>> lttng-modules. But it was unexport in 'commit bc359d03c7ec ("block: add
>> a disk_uevent helper")'. Here export them again.
> 
> Err, no.  We never export things for out of tree modules.  And any kind
> of driver code has absolutely no business looking at the partition tables
> to start with, modular or not.
> I see. Thanks.

//Yanfei

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-26 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26 12:10 [PATCH] block: export disk_part_iter_* helpers yanfei.xu
2021-03-26 12:13 ` Christoph Hellwig
2021-03-26 13:01   ` Xu, Yanfei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).