Skip to contentSkip to conversation

block: export disk_part_iter_* helpers

PATCH In review [email protected] 2 participants 3 messages Mar 26, 2021 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: export disk_part_iter_* helpers

From: Yanfei Xu <[email protected]>

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.

---
 block/genhd.c | 3 +++
 1 file changed, 3 insertions(+)
block/genhd.c +3 -0
index 8c8f543572e6..4eac897baffe 100644
@@ -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.
Signature · 1 line
2.27.0
#1 lore raw
Quoted 5 lines · On Fri, Mar 26, 2021 at 08:10:59PM +0800, [email protected] wrote:

From: Yanfei Xu <[email protected]>

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.

author
#2 lore raw
Quoted 5 lines · Christoph Hellwig

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 2 lines · On Fri, Mar 26, 2021 at 08:10:59PM +0800, [email protected] wrote:

From: Yanfei Xu <[email protected]>

Quoted 8 lines
Quoted 3 lines

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