fs/read_write: Do not export __kernel_write() to the entire world
PATCH v2 1/1 fs/read_write: Do not export __kernel_write() to the entire world
Since we have EXPORT_SYMBOL_FOR_MODULES(), we may narrow the __kernel_write() export to the only which really needs it. With that being done, update the respective comment.
---
v2: updated to use new name of the macro
fs/read_write.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
fs/read_write.c +2 -3
@@ -641,13 +641,12 @@ ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_treturn __kernel_write_iter (file, &iter, pos); }/* -* This "EXPORT_SYMBOL_GPL()" is more of a "EXPORT_SYMBOL_DONTUSE()", -* but autofs is one of the few internal kernel users that actually +* autofs is one of the few internal kernel users that actually * wants this _and_ can be built as a module. So we need to export * this symbol for autofs, even though it really isn't appropriate * for any other kernel modules. */ -EXPORT_SYMBOL_GPL (__kernel_write); +EXPORT_SYMBOL_FOR_MODULES (__kernel_write,"autofs" );ssize_t kernel_write (struct file *file,const void *buf,size_t count,loff_t *pos)
Signature · 1 line
2.50.1
Quoted 3 lines · Andy Shevchenko
Since we have
EXPORT_SYMBOL_FOR_MODULES(), we may narrow the__kernel_write()export to the only which really needs it. With that being done, update the respective comment.
Applied to the vfs-7.2.misc branch of the vfs/vfs.git tree. Patches in the vfs-7.2.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs-7.2.misc
[1/1] fs/read_write: Do not export __kernel_write() to the entire world
https://git.kernel.org/vfs/vfs/c/438f0c1fad74