maple_tree: export symbol mas_preallocate()
Subsystems (3)
PATCH 1/1 maple_tree: export symbol mas_preallocate()
Fix missing EXPORT_SYMBOL_GPL() statement for mas_preallocate().
--- lib/maple_tree.c | 1 + 1 file changed, 1 insertion(+)
lib/maple_tree.c +1 -0
@@ -5733,6 +5733,7 @@ int mas_preallocate(struct ma_state *mas, void *entry, gfp_t gfp)mas_reset (mas);return ret; } +EXPORT_SYMBOL_GPL (mas_preallocate);/* * mas_destroy() - destroy a maple state.
Signature · 1 line
2.39.2
Thanks for the patch. This should indeed be exported.
Quoted 22 lines · Danilo Krummrich
Fix missing
EXPORT_SYMBOL_GPL()statement formas_preallocate().Signed-off-by Danilo Krummrich <[email protected]>--- lib/maple_tree.c | 1 + 1 file changed, 1 insertion(+)lib/maple_tree.c +1
-0@@ -5733,6 +5733,7 @@ int mas_preallocate(struct ma_state *mas, void *entry, gfp_t gfp)mas_reset (mas);return ret; } +EXPORT_SYMBOL_GPL (mas_preallocate);/* * mas_destroy() - destroy a maple state. Signature · 1 line
2.39.2
Quoted 3 lines · Liam R. Howlett
Thanks for the patch. This should indeed be exported.
Reviewed-by Liam R. Howlett <[email protected]>
What uses it? Don't we export only things used by in-kernel modules?
Quoted 24 lines · Danilo Krummrich
Quoted 22 lines
Fix missing
EXPORT_SYMBOL_GPL()statement formas_preallocate().Signed-off-by Danilo Krummrich <[email protected]>--- lib/maple_tree.c | 1 + 1 file changed, 1 insertion(+)lib/maple_tree.c +1
-0@@ -5733,6 +5733,7 @@ int mas_preallocate(struct ma_state *mas, void *entry, gfp_t gfp)mas_reset (mas);return ret; } +EXPORT_SYMBOL_GPL (mas_preallocate);/* * mas_destroy() - destroy a maple state. Signature · 1 line
2.39.2
Quoted 6 lines · Vlastimil Babka
Quoted 3 lines · Liam R. Howlett
Thanks for the patch. This should indeed be exported.
Reviewed-by Liam R. Howlett <[email protected]>What uses it? Don't we export only things used by in-kernel modules?
mas_preallocate() is part of the maple tree's 'Advanced API'. All other functions of this API are exported already.
More specifically, e.g. mas_store_prealloc() is exported which doesn't make a lot of sense without mas_preallocate() being available too.
I don't think it is used outside of mm yet, but as a generic tree implementation maple tree is pretty likely to be used in code built as module, e.g. drivers.
Quoted 26 lines
Quoted 25 lines · Danilo Krummrich
Quoted 22 lines
Fix missing
EXPORT_SYMBOL_GPL()statement formas_preallocate().Signed-off-by Danilo Krummrich <[email protected]>--- lib/maple_tree.c | 1 + 1 file changed, 1 insertion(+)lib/maple_tree.c +1
-0@@ -5733,6 +5733,7 @@ int mas_preallocate(struct ma_state *mas, void *entry, gfp_t gfp)mas_reset (mas);return ret; } +EXPORT_SYMBOL_GPL (mas_preallocate);/* * mas_destroy() - destroy a maple state. Signature · 1 line
2.39.2
Quoted 11 lines · Danilo Krummrich
Quoted 6 lines · Vlastimil Babka
Quoted 3 lines · Liam R. Howlett
Thanks for the patch. This should indeed be exported.
Reviewed-by Liam R. Howlett <[email protected]>What uses it? Don't we export only things used by in-kernel modules?
mas_preallocate()is part of the maple tree's 'Advanced API'. All other functions of this API are exported already.
Quoted 6 lines
More specifically, e.g.
mas_store_prealloc()is exported which doesn't make a lot of sense withoutmas_preallocate()being available too.I don't think it is used outside of mm yet, but as a generic tree implementation maple tree is pretty likely to be used in code built as module, e.g. drivers.
If anyone wants to use they can add the export as needed.
Quoted 12 lines · Christoph Hellwig
Quoted 11 lines · Danilo Krummrich
Quoted 6 lines · Vlastimil Babka
Quoted 3 lines · Liam R. Howlett
Thanks for the patch. This should indeed be exported.
Reviewed-by Liam R. Howlett <[email protected]>What uses it? Don't we export only things used by in-kernel modules?
mas_preallocate()is part of the maple tree's 'Advanced API'. All other functions of this API are exported already.
Quoted 9 lines
Quoted 6 lines
More specifically, e.g.
mas_store_prealloc()is exported which doesn't make a lot of sense withoutmas_preallocate()being available too.I don't think it is used outside of mm yet, but as a generic tree implementation maple tree is pretty likely to be used in code built as module, e.g. drivers.
If anyone wants to use they can add the export as needed.
Valid perception, though personally I wouldn't share it in this specific case.
Anyway, it's just that all other functions of the 'Advanced API' are exported already without them having other users than mm either, e.g. mas_store_prealloc() can't be used without mas_preallocate(), hence exporting one, but not the other doesn't really make sense.
Consistency wise I think we should either also export mas_preallocate() or don't export the other ones either.
Quoted 2 lines · Danilo Krummrich
Consistency wise I think we should either also export
mas_preallocate()or don't export the other ones either.
Please send a patch to drop all unused exports.
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines · Danilo Krummrich
Consistency wise I think we should either also export
mas_preallocate()or don't export the other ones either.Please send a patch to drop all unused exports.
While that's usually a good rule, it just creates unnecessary friction in this kind of case -- a set of library functions which have only been introduced in the last few months. If they're still unused in a year, sure, let's get rid of the exports.