Skip to contentSkip to conversation

Need more symbols to be exported out of kernel

DISCUSSION Oleg Drokin 2 participants 3 messages Aug 19, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello!

I have implemented file_operations->write() function for reiserfs for linux kernel v2.4, and it seems I need these symbols to be exported out of kernel for a case when reiserfs is built as a module:
generic_osync_inode
remove_suid
block_commit_write

I need block_commit_write just because generic_commit_write is doing some extra stuff I'd better do myself.
Will the patch to export these symbols be accepted? (should these be exported as GPL sysmbols or not?).

You can look a my current code on top of 2.4.20-pre2+ at ftp://ftp.namesys.com/pub/reiserfs-for-2.4/2.4.19.pending/testing

Bye,
Oleg

#1 lore raw
Quoted 6 lines · Oleg Drokin

Hello!

I have implemented file_operations->write() function for reiserfs for linux kernel v2.4, and it seems I need these symbols to be exported out of kernel for a case when reiserfs is built as a module:
generic_osync_inode

sounds like a good idea.

Quoted 1 line

remove_suid

trivial inline, either move it to a header or copy & paste.

Quoted 1 line

block_commit_write

fine with me.

Quoted 4 lines

I need block_commit_write just because generic_commit_write is doing some extra stuff I'd better do myself.
Will the patch to export these symbols be accepted? (should these be exported as GPL sysmbols or not?).

IMHO no _GPL, they are not different from other generic filesystem code.

#2 lore raw

Hello!

Quoted 2 lines · Christoph Hellwig
Quoted 1 line

remove_suid

trivial inline, either move it to a header or copy & paste.

Moving to header file trned out to be not that trivial ;) So I just exported it as it is, since it never was inline desplite the definition.
Ans I hate duplicating code as it will become maintenance nightmare later.

Ok, here is first draft of the patch, any issues?

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:

#	           ChangeSet	1.748   -> 1.749  
#	      kernel/ksyms.c	1.60    -> 1.61   
#	        mm/filemap.c	1.67    -> 1.68   

#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/08/19 [email protected] 1.749

# export generic_osync_inode,block_commit_write, remove_suid
# --------------------------------------------
#
diff -Nru a/kernel/ksyms.c b/kernel/ksyms.c
--- a/kernel/ksyms.c	Mon Aug 19 19:24:31 2002
+++ b/kernel/ksyms.c	Mon Aug 19 19:24:31 2002
@@ -215,6 +215,7 @@
 EXPORT_SYMBOL(generic_cont_expand);
 EXPORT_SYMBOL(cont_prepare_write);
 EXPORT_SYMBOL(generic_commit_write);
+EXPORT_SYMBOL(block_commit_write);
 EXPORT_SYMBOL(block_truncate_page);
 EXPORT_SYMBOL(generic_block_bmap);
 EXPORT_SYMBOL(generic_file_read);
@@ -531,6 +532,8 @@
 EXPORT_SYMBOL(is_bad_inode);
 EXPORT_SYMBOL(event);
 EXPORT_SYMBOL(brw_page);
+EXPORT_SYMBOL(generic_osync_inode);
+EXPORT_SYMBOL(remove_suid);

#ifdef CONFIG_UID16
EXPORT_SYMBOL(overflowuid);

mm/filemap.c +1 -1
diff -Nru a/mm/filemap.c b/mm/filemap.c
@@ -2886,7 +2886,7 @@
 	return page;
 }
 
-inline void remove_suid(struct inode *inode)
+void remove_suid(struct inode *inode)
 {
 	unsigned int mode;
 

Bye,
Oleg