Skip to contentSkip to conversation

today's batch of "nuking kernel/ksyms.c"

PATCH In review Arnaldo Carvalho de Melo 2 participants 3 messages Oct 2, 2003

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

PATCH 1/1 today's batch of "nuking kernel/ksyms.c"

Hi Linus,

Please pull from:

bk://kernel.bkbits.net/acme/ksyms-2.6

Thanks,

- Arnaldo

===================================================================

[email protected], 2003-10-02 02:39:04-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/fcntl.c

[email protected], 2003-10-02 02:32:40-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/attr.c

[email protected], 2003-10-02 02:28:31-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/filesystems.c

[email protected], 2003-10-02 02:14:22-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/fs-writeback.c

[email protected], 2003-10-02 02:10:28-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/partitions/check.c

[email protected], 2003-10-02 02:02:17-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/select.c

[email protected], 2003-10-02 01:54:54-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/locks.c

[email protected], 2003-10-02 01:46:05-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/namespace.c

[email protected], 2003-10-02 01:31:38-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/file_table.c

[email protected], 2003-10-02 01:26:03-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/open.c

[email protected], 2003-10-02 01:17:47-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/stat.c

[email protected], 2003-10-02 01:04:15-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/read_write.c

 fs/attr.c             |   11 +++++-
 fs/fcntl.c            |   41 ++++++++++++----------
 fs/file_table.c       |   29 +++++++++++-----
 fs/filesystems.c      |   28 ++++++++-------
 fs/fs-writeback.c     |   24 +++++++------
 fs/locks.c            |   90 +++++++++++++++++++++++++++++++-------------------
 fs/namespace.c        |   46 ++++++++++++++-----------
 fs/open.c             |   74 ++++++++++++++++++++++++++---------------
 fs/partitions/check.c |   52 +++++++++++++++++++---------
 fs/read_write.c       |   65 ++++++++++++++++++++++++++----------
 fs/select.c           |   28 ++++++++++-----
 fs/stat.c             |   57 +++++++++++++++++++++++++------
 kernel/ksyms.c        |   66 ------------------------------------
 13 files changed, 358 insertions(+), 253 deletions(-)
fs/attr.c +9 -2
diff -Nru a/fs/attr.c b/fs/attr.c
@@ -5,6 +5,7 @@
  *  changes by Thomas Schoebel-Theuer
  */
 
+#include <linux/module.h>
 #include <linux/time.h>
 #include <linux/mm.h>
 #include <linux/string.h>
@@ -59,7 +60,9 @@
 	return retval;
 }
 
-int inode_setattr(struct inode * inode, struct iattr * attr)
+EXPORT_SYMBOL(inode_change_ok);
+
+int inode_setattr(struct inode *inode, struct iattr *attr)
 {
 	unsigned int ia_valid = attr->ia_valid;
 	int error = 0;
@@ -100,6 +103,8 @@
 	return error;
 }
 
+EXPORT_SYMBOL(inode_setattr);
+
 int setattr_mask(unsigned int ia_valid)
 {
 	unsigned long dn_mask = 0;
@@ -122,7 +127,7 @@
 	return dn_mask;
 }
 
-int notify_change(struct dentry * dentry, struct iattr * attr)
+int notify_change(struct dentry *dentry, struct iattr *attr)
 {
 	struct inode *inode = dentry->d_inode;
 	mode_t mode = inode->i_mode;
@@ -184,3 +189,5 @@
 	}
 	return error;
 }
+
+EXPORT_SYMBOL(notify_change);
fs/fcntl.c +23 -18

123 lines not on this page · raw message

fs/file_table.c +21 -8
diff -Nru a/fs/file_table.c b/fs/file_table.c
@@ -22,16 +22,20 @@
 	.max_files = NR_FILE
 };
 
+EXPORT_SYMBOL(files_stat); /* Needed by unix.o */
+
 /* public *and* exported. Not pretty! */
 spinlock_t __cacheline_aligned_in_smp files_lock = SPIN_LOCK_UNLOCKED;
 
+EXPORT_SYMBOL(files_lock);
+
 static spinlock_t filp_count_lock = SPIN_LOCK_UNLOCKED;
 
 /* slab constructors and destructors are called from arbitrary
  * context and must be fully threaded - use a local spinlock
  * to protect files_stat.nr_files
  */
-void filp_ctor(void * objp, struct kmem_cache_s *cachep, unsigned long cflags)
+void filp_ctor(void *objp, struct kmem_cache_s *cachep, unsigned long cflags)
 {
 	if ((cflags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
 	    SLAB_CTOR_CONSTRUCTOR) {
@@ -42,7 +46,7 @@
 	}
 }
 
-void filp_dtor(void * objp, struct kmem_cache_s *cachep, unsigned long dflags)
+void filp_dtor(void *objp, struct kmem_cache_s *cachep, unsigned long dflags)
 {
 	unsigned long flags;
 	spin_lock_irqsave(&filp_count_lock, flags);
@@ -61,8 +65,8 @@
  */
 struct file *get_empty_filp(void)
 {
-static int old_max;
-	struct file * f;
+	static int old_max;
+	struct file *f;
 
 	/*
 	 * Privileged users can go above max_files
@@ -100,6 +104,8 @@
 	return NULL;
 }
 
+EXPORT_SYMBOL(get_empty_filp);
+
 /*
  * Clear and initialize a (private) struct file for the given dentry,
  * allocate the security structure, and call the open function (if any).  
@@ -128,25 +134,31 @@
 	return error;
 }
 
+EXPORT_SYMBOL(open_private_file);
+
 /*
  * Release a private file by calling the release function (if any) and
  * freeing the security structure.
  */
 void close_private_file(struct file *file)
 {
-	struct inode * inode = file->f_dentry->d_inode;
+	struct inode *inode = file->f_dentry->d_inode;
 
 	if (file->f_op && file->f_op->release)
 		file->f_op->release(inode, file);
 	security_file_free(file);
 }
 
+EXPORT_SYMBOL(close_private_file);
+
 void fput(struct file *file)
 {
 	if (atomic_dec_and_test(&file->f_count))
 		__fput(file);
 }
 
+EXPORT_SYMBOL(fput);
+
 /* __fput is called from task context when aio completion releases the last
  * last use of a struct file *.  Do not use otherwise.
  */
@@ -192,6 +204,8 @@
 	return file;
 }
 
+EXPORT_SYMBOL(fget);
+
 /*
  * Lightweight file lookup - no refcnt increment if fd table isn't shared. 
  * You can use this only if it is guranteed that the current task already 
@@ -229,6 +243,8 @@
 	}
 }
 
+EXPORT_SYMBOL(put_filp);
+
 void file_move(struct file *file, struct list_head *list)
 {
 	if (!list)
@@ -284,6 +300,3 @@
 	if (files_stat.max_files < NR_FILE)
 		files_stat.max_files = NR_FILE;
 } 
-
-/* Needed by unix.o */
-EXPORT_SYMBOL(files_stat);
fs/filesystems.c +16 -12
diff -Nru a/fs/filesystems.c b/fs/filesystems.c
@@ -61,8 +61,7 @@
  *	structures and must not be freed until the file system has been
  *	unregistered.
  */
- 
-int register_filesystem(struct file_system_type * fs)
+int register_filesystem(struct file_system_type *fs)
 {
 	int res = 0;
 	struct file_system_type ** p;
@@ -82,6 +81,8 @@
 	return res;
 }
 
+EXPORT_SYMBOL(register_filesystem);
+
 /**
  *	unregister_filesystem - unregister a file system
  *	@fs: filesystem to unregister
@@ -93,10 +94,9 @@
  *	Once this function has returned the &struct file_system_type structure
  *	may be freed or reused.
  */
- 
-int unregister_filesystem(struct file_system_type * fs)
+int unregister_filesystem(struct file_system_type *fs)
 {
-	struct file_system_type ** tmp;
+	struct file_system_type **tmp;
 
 	write_lock(&file_systems_lock);
 	tmp = &file_systems;
@@ -113,10 +113,12 @@
 	return -EINVAL;
 }
 
-static int fs_index(const char __user * __name)
+EXPORT_SYMBOL(unregister_filesystem);
+
+static int fs_index(const char __user *__name)
 {
-	struct file_system_type * tmp;
-	char * name;
+	struct file_system_type *tmp;
+	char *name;
 	int err, index;
 
 	name = getname(__name);
@@ -137,9 +139,9 @@
 	return err;
 }
 
-static int fs_name(unsigned int index, char __user * buf)
+static int fs_name(unsigned int index, char __user *buf)
 {
-	struct file_system_type * tmp;
+	struct file_system_type *tmp;
 	int len, res;
 
 	read_lock(&file_systems_lock);
@@ -159,7 +161,7 @@
 
 static int fs_maxindex(void)
 {
-	struct file_system_type * tmp;
+	struct file_system_type *tmp;
 	int index;
 
 	read_lock(&file_systems_lock);
@@ -192,7 +194,7 @@
 	return retval;
 }
 
-int get_filesystem_list(char * buf)
+int get_filesystem_list(char *buf)
 {
 	int len = 0;
 	struct file_system_type * tmp;
@@ -227,3 +229,5 @@
 	}
 	return fs;
 }
+
+EXPORT_SYMBOL(get_fs_type);
fs/fs-writeback.c +13 -11
diff -Nru a/fs/fs-writeback.c b/fs/fs-writeback.c
@@ -107,6 +107,8 @@
 	spin_unlock(&inode_lock);
 }
 
+EXPORT_SYMBOL(__mark_inode_dirty);
+
 static void write_inode(struct inode *inode, int sync)
 {
 	if (inode->i_sb->s_op->write_inode && !is_bad_inode(inode))
@@ -129,8 +131,8 @@
  *
  * Called under inode_lock.
  */
-static void
-__sync_single_inode(struct inode *inode, struct writeback_control *wbc)
+static void __sync_single_inode(struct inode *inode,
+				struct writeback_control *wbc)
 {
 	unsigned dirty;
 	struct address_space *mapping = inode->i_mapping;
@@ -194,9 +196,8 @@
 /*
  * Write out an inode's dirty pages.  Called under inode_lock.
  */
-static void
-__writeback_single_inode(struct inode *inode,
-			struct writeback_control *wbc)
+static void __writeback_single_inode(struct inode *inode,
+				     struct writeback_control *wbc)
 {
 	if ((wbc->sync_mode != WB_SYNC_ALL) && (inode->i_state & I_LOCK)) {
 		list_move(&inode->i_list, &inode->i_sb->s_dirty);
@@ -246,8 +247,8 @@
  * on the writer throttling path, and we get decent balancing between many
  * throttled threads: we don't want them all piling up on __wait_on_inode.
  */
-static void
-sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
+static void sync_sb_inodes(struct super_block *sb,
+			   struct writeback_control *wbc)
 {
 	const unsigned long start = jiffies;	/* livelock avoidance */
 
@@ -341,8 +342,7 @@
  * sync_sb_inodes will seekout the blockdev which matches `bdi'.  Maybe not
  * super-efficient but we're about to do a ton of I/O...
  */
-void
-writeback_inodes(struct writeback_control *wbc)
+void writeback_inodes(struct writeback_control *wbc)
 {
 	struct super_block *sb;
 
@@ -479,7 +479,6 @@
  *	This function commits an inode to disk immediately if it is
  *	dirty. This is primarily needed by knfsd.
  */
- 
 void write_inode_now(struct inode *inode, int sync)
 {
 	struct writeback_control wbc = {
@@ -494,6 +493,8 @@
 		wait_on_inode(inode);
 }
 
+EXPORT_SYMBOL(write_inode_now);
+
 /**
  * generic_osync_inode - flush all dirty data for a given inode to disk
  * @inode: inode to write
@@ -509,7 +510,6 @@
  *    OSYNC_METADATA: the buffers at i_mapping->private_list
  *    OSYNC_INODE:    the inode itself
  */
-
 int generic_osync_inode(struct inode *inode, int what)
 {
 	int err = 0;
@@ -544,6 +544,8 @@
 
 	return err;
 }
+
+EXPORT_SYMBOL(generic_osync_inode);
 
 /**
  * writeback_acquire: attempt to get exclusive writeback access to a device
fs/locks.c +56 -34

271 lines not on this page · raw message

fs/namespace.c +26 -20

133 lines not on this page · raw message

fs/open.c +47 -27

256 lines not on this page · raw message

fs/partitions/check.c +35 -17

147 lines not on this page · raw message

fs/read_write.c +48 -17

180 lines not on this page · raw message

fs/select.c +19 -9
diff -Nru a/fs/select.c b/fs/select.c
@@ -14,6 +14,7 @@
  *     of fds to overcome nfds < 16390 descriptors limit (Tigran Aivazian).
  */
 
+#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/smp_lock.h>
 #include <linux/poll.h>
@@ -53,7 +54,8 @@
  * as all select/poll functions have to call it to add an entry to the
  * poll table.
  */
-void __pollwait(struct file *filp, wait_queue_head_t *wait_address, poll_table *p);
+void __pollwait(struct file *filp, wait_queue_head_t *wait_address,
+		poll_table *p);
 
 void poll_initwait(struct poll_wqueues *pwq)
 {
@@ -62,6 +64,8 @@
 	pwq->table = NULL;
 }
 
+EXPORT_SYMBOL(poll_initwait);
+
 void poll_freewait(struct poll_wqueues *pwq)
 {
 	struct poll_table_page * p = pwq->table;
@@ -81,7 +85,10 @@
 	}
 }
 
-void __pollwait(struct file *filp, wait_queue_head_t *wait_address, poll_table *_p)
+EXPORT_SYMBOL(poll_freewait);
+
+void __pollwait(struct file *filp, wait_queue_head_t *wait_address,
+		poll_table *_p)
 {
 	struct poll_wqueues *p = container_of(_p, struct poll_wqueues, pt);
 	struct poll_table_page *table = p->table;
@@ -89,7 +96,7 @@
 	if (!table || POLL_TABLE_FULL(table)) {
 		struct poll_table_page *new_table;
 
-		new_table = (struct poll_table_page *) __get_free_page(GFP_KERNEL);
+		new_table = (struct poll_table_page *)__get_free_page(GFP_KERNEL);
 		if (!new_table) {
 			p->error = -ENOMEM;
 			__set_current_state(TASK_RUNNING);
@@ -266,6 +273,8 @@
 	return retval;
 }
 
+EXPORT_SYMBOL(do_select);
+
 static void *select_bits_alloc(int size)
 {
 	return kmalloc(6 * size, GFP_KERNEL);
@@ -287,8 +296,8 @@
 #define MAX_SELECT_SECONDS \
 	((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1)
 
-asmlinkage long
-sys_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, struct timeval __user *tvp)
+asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp,
+			   fd_set __user *exp, struct timeval __user *tvp)
 {
 	fd_set_bits fds;
 	char *bits;
@@ -388,8 +397,8 @@
 
 #define POLLFD_PER_PAGE  ((PAGE_SIZE-sizeof(struct poll_list)) / sizeof(struct pollfd))
 
-static void do_pollfd(unsigned int num, struct pollfd * fdpage,
-	poll_table ** pwait, int *count)
+static void do_pollfd(unsigned int num, struct pollfd *fdpage,
+		      poll_table **pwait, int *count)
 {
 	int i;
 
@@ -421,7 +430,7 @@
 }
 
 static int do_poll(unsigned int nfds,  struct poll_list *list,
-			struct poll_wqueues *wait, long timeout)
+		   struct poll_wqueues *wait, long timeout)
 {
 	int count = 0;
 	poll_table* pt = &wait->pt;
@@ -449,7 +458,8 @@
 	return count;
 }
 
-asmlinkage long sys_poll(struct pollfd __user * ufds, unsigned int nfds, long timeout)
+asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds,
+			 long timeout)
 {
 	struct poll_wqueues table;
  	int fdcount, err;
fs/stat.c +45 -12

185 lines not on this page · raw message

kernel/ksyms.c +0 -66

126 lines not on this page · raw message

===================================================================

#1 lore raw

If this is all the same idea why are you putting it in multiple changesets? Where I work we have a rule "one idea, one changeset", which makes it far easier to track down problems later.

Quoted 24 lines · Arnaldo Carvalho de Melo

[email protected], 2003-10-02 02:39:04-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/fcntl.c
[email protected], 2003-10-02 02:32:40-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/attr.c
[email protected], 2003-10-02 02:28:31-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/filesystems.c
[email protected], 2003-10-02 02:14:22-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/fs-writeback.c
[email protected], 2003-10-02 02:10:28-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/partitions/check.c
[email protected], 2003-10-02 02:02:17-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/select.c
[email protected], 2003-10-02 01:54:54-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/locks.c
[email protected], 2003-10-02 01:46:05-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/namespace.c
[email protected], 2003-10-02 01:31:38-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/file_table.c
[email protected], 2003-10-02 01:26:03-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/open.c
[email protected], 2003-10-02 01:17:47-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/stat.c
[email protected], 2003-10-02 01:04:15-03:00, [email protected]
o kernel/ksyms.c: move relevant EXPORT_SYMBOLs to fs/read_write.c

#2 lore raw

Em Wed, Oct 01, 2003 at 09:02:06PM -0700, Larry McVoy escreveu:

Quoted 3 lines

If this is all the same idea why are you putting it in multiple changesets? Where I work we have a rule "one idea, one changeset", which makes it far easier to track down problems later.

Oh well, I thought it was better to slowly deconstruct the thing, started sending, my feedback was that the trees are being pulled by Linus, so everything seems to be allright, if Linus merged all of micro changesets as one changeset I'd understand that as "stop sending as separate changesets, send me just one", and I'd do just that, Linus?

- Arnaldo