Move EXPORT_SYMBOL from kernel/ksyms.c to fs/namei.c

Move EXPORT_SYMBOL from kernel/ksyms.c to fs/namei.c

Post by Matthew Wilco » Wed, 12 Mar 2003 23:30:13



Move EXPORT_SYMBOL() from kernel/ksyms.c to fs/namei.c.
Also make vfs_rename_dir and vfs_rename_other static since they're not
used anywhere else.

diff -urpNX ../dontdiff linux-2.5.64-flA/fs/namei.c linux-2.5.64-flock/fs/namei.c
--- linux-2.5.64-flA/fs/namei.c 2003-02-20 22:47:18.000000000 -0500

 #include <linux/dnotify.h>
 #include <linux/smp_lock.h>
 #include <linux/personality.h>
+#include <linux/module.h>
 #include <linux/security.h>
 #include <linux/mount.h>

  *        ->i_sem on parents, which works but leads to some truely excessive
  *        locking].
  */
-int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
+static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
               struct inode *new_dir, struct dentry *new_dentry)
 {

        return error;
 }

-int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
+static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
               struct inode *new_dir, struct dentry *new_dentry)
 {

        .readlink       = page_readlink,
        .follow_link    = page_follow_link,
 };
+
+EXPORT_SYMBOL(getname);
+EXPORT_SYMBOL(vfs_permission);
+EXPORT_SYMBOL(permission);
+EXPORT_SYMBOL(get_write_access);
+EXPORT_SYMBOL(path_release);
+EXPORT_SYMBOL(follow_up);
+EXPORT_SYMBOL(follow_down);
+EXPORT_SYMBOL(path_walk);
+EXPORT_SYMBOL(path_lookup);
+EXPORT_SYMBOL(lookup_hash);
+EXPORT_SYMBOL(lookup_one_len);
+EXPORT_SYMBOL(__user_walk);
+EXPORT_SYMBOL(lock_rename);
+EXPORT_SYMBOL(unlock_rename);
+EXPORT_SYMBOL(vfs_create);
+EXPORT_SYMBOL(vfs_mknod);
+EXPORT_SYMBOL(vfs_mkdir);
+EXPORT_SYMBOL(vfs_rmdir);
+EXPORT_SYMBOL(vfs_unlink);
+EXPORT_SYMBOL(vfs_symlink);
+EXPORT_SYMBOL(vfs_link);
+EXPORT_SYMBOL(vfs_rename);
+EXPORT_SYMBOL(vfs_readlink);
+EXPORT_SYMBOL(vfs_follow_link);
+EXPORT_SYMBOL(page_readlink);
+EXPORT_SYMBOL(page_follow_link);
+EXPORT_SYMBOL(page_symlink);
+EXPORT_SYMBOL(page_symlink_inode_operations);
diff -urpNX ../dontdiff linux-2.5.64-flA/kernel/ksyms.c linux-2.5.64-flock/kernel/ksyms.c
--- linux-2.5.64-flA/kernel/ksyms.c     2003-03-11 10:03:47.000000000 -0500

 EXPORT_SYMBOL(user_get_super);
 EXPORT_SYMBOL(get_super);
 EXPORT_SYMBOL(drop_super);
-EXPORT_SYMBOL(getname);
 EXPORT_SYMBOL(names_cachep);
 EXPORT_SYMBOL(fput);

 EXPORT_SYMBOL(iunique);
 EXPORT_SYMBOL(iput);
 EXPORT_SYMBOL(inode_init_once);
-EXPORT_SYMBOL(follow_up);
-EXPORT_SYMBOL(follow_down);
 EXPORT_SYMBOL(lookup_mnt);
-EXPORT_SYMBOL(path_lookup);
-EXPORT_SYMBOL(path_walk);
-EXPORT_SYMBOL(path_release);
-EXPORT_SYMBOL(__user_walk);
-EXPORT_SYMBOL(lookup_one_len);
-EXPORT_SYMBOL(lookup_hash);
 EXPORT_SYMBOL(sys_close);
 EXPORT_SYMBOL(dcache_lock);

 EXPORT_SYMBOL_GPL(invalidate_inode_pages2);
 EXPORT_SYMBOL(truncate_inode_pages);
 EXPORT_SYMBOL(fsync_bdev);
-EXPORT_SYMBOL(permission);
-EXPORT_SYMBOL(vfs_permission);
 EXPORT_SYMBOL(inode_setattr);
 EXPORT_SYMBOL(inode_change_ok);

 EXPORT_SYMBOL(vfs_readv);
 EXPORT_SYMBOL(vfs_write);
 EXPORT_SYMBOL(vfs_writev);
-EXPORT_SYMBOL(vfs_create);
-EXPORT_SYMBOL(vfs_mkdir);
-EXPORT_SYMBOL(vfs_mknod);
-EXPORT_SYMBOL(vfs_symlink);
-EXPORT_SYMBOL(vfs_link);
-EXPORT_SYMBOL(vfs_rmdir);
-EXPORT_SYMBOL(vfs_unlink);
-EXPORT_SYMBOL(vfs_rename);
 EXPORT_SYMBOL(vfs_statfs);
 EXPORT_SYMBOL(vfs_fstat);

 EXPORT_SYMBOL(inode_sub_bytes);
 EXPORT_SYMBOL(inode_get_bytes);
 EXPORT_SYMBOL(inode_set_bytes);
-EXPORT_SYMBOL(lock_rename);
-EXPORT_SYMBOL(unlock_rename);
 EXPORT_SYMBOL(generic_read_dir);
 EXPORT_SYMBOL(generic_fillattr);

 EXPORT_SYMBOL(read_cache_page);
 EXPORT_SYMBOL(read_cache_pages);
 EXPORT_SYMBOL(mark_page_accessed);
-EXPORT_SYMBOL(vfs_readlink);
-EXPORT_SYMBOL(vfs_follow_link);
-EXPORT_SYMBOL(page_readlink);
-EXPORT_SYMBOL(page_follow_link);
-EXPORT_SYMBOL(page_symlink_inode_operations);
-EXPORT_SYMBOL(page_symlink);
 EXPORT_SYMBOL(vfs_readdir);
 EXPORT_SYMBOL(__break_lease);

 EXPORT_SYMBOL(partition_name);

-/* binfmt_aout */
-EXPORT_SYMBOL(get_write_access);
-
 /* library functions */
 EXPORT_SYMBOL(strnicmp);
 EXPORT_SYMBOL(strspn);

--
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. fs/namei.c lookup_flags is misleading

2.4.6-pre3 and earlier.  fs/namei.c:lookup_flags() checks for O_CREATE,
it even has a comment saying that O_CREATE|O_EXCL is a special case.
But the only place lookup_flags() is called has

if (!(flag & O_CREAT)) {
        if (path_init(pathname, lookup_flags(flag), nd))

so O_CREATE can never be set.  Not a bug, just misleading.  It does not
help that path_walk() has a variable called lookup_flags.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. What does mdrecovery do when logging out the system?

3. split namei.h out of fs.h

4. UNIX I/O ---HELP

5. fs/namei.c fix

6. Smit(ty)? Or ControlPanel? Anyone?

7. 2.5.56 - missing EXPORT_SYMBOL in fs/devfs/base.c

8. refresh rate

9. SuSE-Kernel 2.4.6 reiserfs, namei.c:343

10. Kyocera FS 1600 or FS 1600+ Printer drivers ( FS-1600 FS-1600+)

11. /dev/ksyms kernel deadlock

12. IP Sub-Networking Mini-HOWTO & /proc/ksyms on 2.2.14-5.0 kernel?

13. kvm: /dev/ksyms is not a 32-bit kernel namelist