diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/include/linux/ext2_fs.h linux-e2all/include/linux/ext2_fs.h --- linux-2.4.17-pre2/include/linux/ext2_fs.h Thu Nov 22 19:46:52 2001 +++ linux-e2all/include/linux/ext2_fs.h Sun Dec 2 11:46:56 2001 @@ -16,6 +16,10 @@ #ifndef _LINUX_EXT2_FS_H #define _LINUX_EXT2_FS_H +#ifndef KSTATIC +#define KSTATIC +#endif + #include /* @@ -546,86 +550,86 @@ # define NORET_AND noreturn, /* balloc.c */ -extern int ext2_bg_has_super(struct super_block *sb, int group); -extern unsigned long ext2_bg_num_gdb(struct super_block *sb, int group); -extern int ext2_new_block (struct inode *, unsigned long, +KSTATIC int ext2_bg_has_super(struct super_block *sb, int group); +KSTATIC unsigned long ext2_bg_num_gdb(struct super_block *sb, int group); +KSTATIC int ext2_new_block (struct inode *, unsigned long, __u32 *, __u32 *, int *); -extern void ext2_free_blocks (struct inode *, unsigned long, +KSTATIC void ext2_free_blocks (struct inode *, unsigned long, unsigned long); -extern unsigned long ext2_count_free_blocks (struct super_block *); -extern void ext2_check_blocks_bitmap (struct super_block *); -extern struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb, +KSTATIC unsigned long ext2_count_free_blocks (struct super_block *); +KSTATIC void ext2_check_blocks_bitmap (struct super_block *); +KSTATIC struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb, unsigned int block_group, struct buffer_head ** bh); /* dir.c */ -extern int ext2_add_link (struct dentry *, struct inode *); -extern ino_t ext2_inode_by_name(struct inode *, struct dentry *); -extern int ext2_make_empty(struct inode *, struct inode *); -extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,struct dentry *, struct page **); -extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *); -extern int ext2_empty_dir (struct inode *); -extern struct ext2_dir_entry_2 * ext2_dotdot (struct inode *, struct page **); -extern void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page *, struct inode *); +KSTATIC int ext2_add_link (struct dentry *, struct inode *); +KSTATIC ino_t ext2_inode_by_name(struct inode *, struct dentry *); +KSTATIC int ext2_make_empty(struct inode *, struct inode *); +KSTATIC struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,struct dentry *, struct page **); +KSTATIC int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *); +KSTATIC int ext2_empty_dir (struct inode *); +KSTATIC struct ext2_dir_entry_2 * ext2_dotdot (struct inode *, struct page **); +KSTATIC void ext2_set_link(struct inode *, struct ext2_dir_entry_2 *, struct page *, struct inode *); /* fsync.c */ -extern int ext2_sync_file (struct file *, struct dentry *, int); -extern int ext2_fsync_inode (struct inode *, int); +KSTATIC int ext2_sync_file (struct file *, struct dentry *, int); +KSTATIC int ext2_fsync_inode (struct inode *, int); /* ialloc.c */ -extern struct inode * ext2_new_inode (const struct inode *, int); -extern void ext2_free_inode (struct inode *); -extern unsigned long ext2_count_free_inodes (struct super_block *); -extern void ext2_check_inodes_bitmap (struct super_block *); -extern unsigned long ext2_count_free (struct buffer_head *, unsigned); +KSTATIC struct inode * ext2_new_inode (const struct inode *, int); +KSTATIC void ext2_free_inode (struct inode *); +KSTATIC unsigned long ext2_count_free_inodes (struct super_block *); +KSTATIC void ext2_check_inodes_bitmap (struct super_block *); +KSTATIC unsigned long ext2_count_free (struct buffer_head *, unsigned); /* inode.c */ -extern void ext2_read_inode (struct inode *); -extern void ext2_write_inode (struct inode *, int); -extern void ext2_put_inode (struct inode *); -extern void ext2_delete_inode (struct inode *); -extern int ext2_sync_inode (struct inode *); -extern void ext2_discard_prealloc (struct inode *); -extern void ext2_truncate (struct inode *); +KSTATIC void ext2_read_inode (struct inode *); +KSTATIC void ext2_write_inode (struct inode *, int); +KSTATIC void ext2_put_inode (struct inode *); +KSTATIC void ext2_delete_inode (struct inode *); +KSTATIC int ext2_sync_inode (struct inode *); +KSTATIC void ext2_discard_prealloc (struct inode *); +KSTATIC void ext2_truncate (struct inode *); /* ioctl.c */ -extern int ext2_ioctl (struct inode *, struct file *, unsigned int, +KSTATIC int ext2_ioctl (struct inode *, struct file *, unsigned int, unsigned long); /* super.c */ -extern void ext2_error (struct super_block *, const char *, const char *, ...) +KSTATIC void ext2_error (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); -extern NORET_TYPE void ext2_panic (struct super_block *, const char *, +KSTATIC NORET_TYPE void ext2_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((NORET_AND format (printf, 3, 4))); -extern void ext2_warning (struct super_block *, const char *, const char *, ...) +KSTATIC void ext2_warning (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); -extern void ext2_update_dynamic_rev (struct super_block *sb); -extern void ext2_put_super (struct super_block *); -extern void ext2_write_super (struct super_block *); -extern int ext2_remount (struct super_block *, int *, char *); -extern struct super_block * ext2_read_super (struct super_block *,void *,int); -extern int ext2_statfs (struct super_block *, struct statfs *); +KSTATIC void ext2_update_dynamic_rev (struct super_block *sb); +KSTATIC void ext2_put_super (struct super_block *); +KSTATIC void ext2_write_super (struct super_block *); +KSTATIC int ext2_remount (struct super_block *, int *, char *); +KSTATIC struct super_block * ext2_read_super (struct super_block *,void *,int); +KSTATIC int ext2_statfs (struct super_block *, struct statfs *); /* * Inodes and files operations */ /* dir.c */ -extern struct file_operations ext2_dir_operations; +KSTATIC struct file_operations ext2_dir_operations; /* file.c */ -extern struct inode_operations ext2_file_inode_operations; -extern struct file_operations ext2_file_operations; +KSTATIC struct inode_operations ext2_file_inode_operations; +KSTATIC struct file_operations ext2_file_operations; /* inode.c */ -extern struct address_space_operations ext2_aops; +KSTATIC struct address_space_operations ext2_aops; /* namei.c */ -extern struct inode_operations ext2_dir_inode_operations; +KSTATIC struct inode_operations ext2_dir_inode_operations; /* symlink.c */ -extern struct inode_operations ext2_fast_symlink_inode_operations; +KSTATIC struct inode_operations ext2_fast_symlink_inode_operations; #endif /* __KERNEL__ */ diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/include/linux/kernel.h linux-e2all/include/linux/kernel.h --- linux-2.4.17-pre2/include/linux/kernel.h Thu Nov 22 19:46:18 2001 +++ linux-e2all/include/linux/kernel.h Sun Dec 2 11:46:06 2001 @@ -8,6 +8,7 @@ #ifdef __KERNEL__ #include +#include #include #include #include @@ -175,5 +176,11 @@ unsigned int mem_unit; /* Memory unit size in bytes */ char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ }; + +#ifdef CONFIG_FINAL +#define KSTATIC static +#else +#define KSTATIC +#endif #endif diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/include/linux/reiserfs_fs.h linux-e2all/include/linux/reiserfs_fs.h --- linux-2.4.17-pre2/include/linux/reiserfs_fs.h Fri Nov 9 22:18:25 2001 +++ linux-e2all/include/linux/reiserfs_fs.h Sun Dec 2 12:28:54 2001 @@ -13,6 +13,7 @@ #define _LINUX_REISER_FS_H #include +#include #ifdef __KERNEL__ #include #include @@ -22,6 +23,9 @@ #include #endif +#undef KSTATIC +#define KSTATIC static + /* * include/linux/reiser_fs.h * @@ -137,8 +141,8 @@ #define REISERFS_SUPER_MAGIC_STRING "ReIsErFs" #define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs" -extern char reiserfs_super_magic_string[]; -extern char reiser2fs_super_magic_string[]; +KSTATIC char reiserfs_super_magic_string[]; +KSTATIC char reiser2fs_super_magic_string[]; static inline int is_reiserfs_magic_string (const struct reiserfs_super_block * rs) { @@ -1658,45 +1662,45 @@ */ #define JOURNAL_BUFFER(j,n) ((j)->j_ap_blocks[((j)->j_start + (n)) % JOURNAL_BLOCK_COUNT]) -void reiserfs_commit_for_inode(struct inode *) ; -void reiserfs_update_inode_transaction(struct inode *) ; -void reiserfs_wait_on_write_block(struct super_block *s) ; -void reiserfs_block_writes(struct reiserfs_transaction_handle *th) ; -void reiserfs_allow_writes(struct super_block *s) ; -void reiserfs_check_lock_depth(char *caller) ; -void reiserfs_prepare_for_journal(struct super_block *, struct buffer_head *bh, int wait) ; -void reiserfs_restore_prepared_buffer(struct super_block *, struct buffer_head *bh) ; -int journal_init(struct super_block *) ; -int journal_release(struct reiserfs_transaction_handle*, struct super_block *) ; -int journal_release_error(struct reiserfs_transaction_handle*, struct super_block *) ; -int journal_end(struct reiserfs_transaction_handle *, struct super_block *, unsigned long) ; -int journal_end_sync(struct reiserfs_transaction_handle *, struct super_block *, unsigned long) ; -int journal_mark_dirty_nolog(struct reiserfs_transaction_handle *, struct super_block *, struct buffer_head *bh) ; -int journal_mark_freed(struct reiserfs_transaction_handle *, struct super_block *, unsigned long blocknr) ; -int push_journal_writer(char *w) ; -int pop_journal_writer(int windex) ; -int journal_lock_dobalance(struct super_block *p_s_sb) ; -int journal_unlock_dobalance(struct super_block *p_s_sb) ; -int journal_transaction_should_end(struct reiserfs_transaction_handle *, int) ; -int reiserfs_in_journal(struct super_block *p_s_sb, kdev_t dev, unsigned long bl, int size, int searchall, unsigned long *next) ; -int journal_begin(struct reiserfs_transaction_handle *, struct super_block *p_s_sb, unsigned long) ; -int journal_join(struct reiserfs_transaction_handle *, struct super_block *p_s_sb, unsigned long) ; -struct super_block *reiserfs_get_super(kdev_t dev) ; -void flush_async_commits(struct super_block *p_s_sb) ; - -int remove_from_transaction(struct super_block *p_s_sb, unsigned long blocknr, int already_cleaned) ; -int remove_from_journal_list(struct super_block *s, struct reiserfs_journal_list *jl, struct buffer_head *bh, int remove_freed) ; - -int buffer_journaled(const struct buffer_head *bh) ; -int mark_buffer_journal_new(struct buffer_head *bh) ; -int reiserfs_sync_all_buffers(kdev_t dev, int wait) ; -int reiserfs_sync_buffers(kdev_t dev, int wait) ; -int reiserfs_add_page_to_flush_list(struct reiserfs_transaction_handle *, +KSTATIC void reiserfs_commit_for_inode(struct inode *) ; +KSTATIC void reiserfs_update_inode_transaction(struct inode *) ; +KSTATIC void reiserfs_wait_on_write_block(struct super_block *s) ; +KSTATIC void reiserfs_block_writes(struct reiserfs_transaction_handle *th) ; +KSTATIC void reiserfs_allow_writes(struct super_block *s) ; +KSTATIC void reiserfs_check_lock_depth(char *caller) ; +KSTATIC void reiserfs_prepare_for_journal(struct super_block *, struct buffer_head *bh, int wait) ; +KSTATIC void reiserfs_restore_prepared_buffer(struct super_block *, struct buffer_head *bh) ; +KSTATIC int journal_init(struct super_block *) ; +KSTATIC int journal_release(struct reiserfs_transaction_handle*, struct super_block *) ; +KSTATIC int journal_release_error(struct reiserfs_transaction_handle*, struct super_block *) ; +KSTATIC int journal_end(struct reiserfs_transaction_handle *, struct super_block *, unsigned long) ; +KSTATIC int journal_end_sync(struct reiserfs_transaction_handle *, struct super_block *, unsigned long) ; +KSTATIC int journal_mark_dirty_nolog(struct reiserfs_transaction_handle *, struct super_block *, struct buffer_head *bh) ; +KSTATIC int journal_mark_freed(struct reiserfs_transaction_handle *, struct super_block *, unsigned long blocknr) ; +KSTATIC int push_journal_writer(char *w) ; +KSTATIC int pop_journal_writer(int windex) ; +KSTATIC int journal_lock_dobalance(struct super_block *p_s_sb) ; +KSTATIC int journal_unlock_dobalance(struct super_block *p_s_sb) ; +KSTATIC int journal_transaction_should_end(struct reiserfs_transaction_handle *, int) ; +KSTATIC int reiserfs_in_journal(struct super_block *p_s_sb, kdev_t dev, unsigned long bl, int size, int searchall, unsigned long *next) ; +KSTATIC int journal_begin(struct reiserfs_transaction_handle *, struct super_block *p_s_sb, unsigned long) ; +KSTATIC int journal_join(struct reiserfs_transaction_handle *, struct super_block *p_s_sb, unsigned long) ; +KSTATIC struct super_block *reiserfs_get_super(kdev_t dev) ; +KSTATIC void flush_async_commits(struct super_block *p_s_sb) ; + +KSTATIC int remove_from_transaction(struct super_block *p_s_sb, unsigned long blocknr, int already_cleaned) ; +KSTATIC int remove_from_journal_list(struct super_block *s, struct reiserfs_journal_list *jl, struct buffer_head *bh, int remove_freed) ; + +KSTATIC inline int buffer_journaled(const struct buffer_head *bh) ; +KSTATIC inline int mark_buffer_journal_new(struct buffer_head *bh) ; +KSTATIC int reiserfs_sync_all_buffers(kdev_t dev, int wait) ; +KSTATIC int reiserfs_sync_buffers(kdev_t dev, int wait) ; +KSTATIC int reiserfs_add_page_to_flush_list(struct reiserfs_transaction_handle *, struct inode *, struct buffer_head *) ; -int reiserfs_remove_page_from_flush_list(struct reiserfs_transaction_handle *, +KSTATIC int reiserfs_remove_page_from_flush_list(struct reiserfs_transaction_handle *, struct inode *) ; -int reiserfs_allocate_list_bitmaps(struct super_block *s, struct reiserfs_list_bitmap *, int) ; +KSTATIC int reiserfs_allocate_list_bitmaps(struct super_block *s, struct reiserfs_list_bitmap *, int) ; /* why is this kerplunked right here? */ static inline int reiserfs_buffer_prepared(const struct buffer_head *bh) { @@ -1726,12 +1730,12 @@ } /* objectid.c */ -__u32 reiserfs_get_unused_objectid (struct reiserfs_transaction_handle *th); -void reiserfs_release_objectid (struct reiserfs_transaction_handle *th, __u32 objectid_to_release); -int reiserfs_convert_objectid_map_v1(struct super_block *) ; +KSTATIC __u32 reiserfs_get_unused_objectid (struct reiserfs_transaction_handle *th); +KSTATIC void reiserfs_release_objectid (struct reiserfs_transaction_handle *th, __u32 objectid_to_release); +KSTATIC int reiserfs_convert_objectid_map_v1(struct super_block *) ; /* stree.c */ -int B_IS_IN_TREE(const struct buffer_head *); +KSTATIC int B_IS_IN_TREE(const struct buffer_head *); extern inline void copy_short_key (void * to, const void * from); extern inline void copy_item_head(struct item_head * p_v_to, const struct item_head * p_v_from); @@ -1775,49 +1779,49 @@ } -int comp_items (const struct item_head * stored_ih, const struct path * p_s_path); -const struct key * get_rkey (const struct path * p_s_chk_path, +KSTATIC int comp_items (const struct item_head * stored_ih, const struct path * p_s_path); +KSTATIC const struct key * get_rkey (const struct path * p_s_chk_path, const struct super_block * p_s_sb); -inline int bin_search (const void * p_v_key, const void * p_v_base, +KSTATIC inline int bin_search (const void * p_v_key, const void * p_v_base, int p_n_num, int p_n_width, int * p_n_pos); -int search_by_key (struct super_block *, const struct cpu_key *, +KSTATIC int search_by_key (struct super_block *, const struct cpu_key *, struct path *, int); #define search_item(s,key,path) search_by_key (s, key, path, DISK_LEAF_NODE_LEVEL) -int search_for_position_by_key (struct super_block * p_s_sb, +KSTATIC int search_for_position_by_key (struct super_block * p_s_sb, const struct cpu_key * p_s_cpu_key, struct path * p_s_search_path); extern inline void decrement_bcount (struct buffer_head * p_s_bh); -void decrement_counters_in_path (struct path * p_s_search_path); -void pathrelse (struct path * p_s_search_path); -int reiserfs_check_path(struct path *p) ; -void pathrelse_and_restore (struct super_block *s, struct path * p_s_search_path); +KSTATIC void decrement_counters_in_path (struct path * p_s_search_path); +KSTATIC void pathrelse (struct path * p_s_search_path); +KSTATIC int reiserfs_check_path(struct path *p) ; +KSTATIC void pathrelse_and_restore (struct super_block *s, struct path * p_s_search_path); -int reiserfs_insert_item (struct reiserfs_transaction_handle *th, +KSTATIC int reiserfs_insert_item (struct reiserfs_transaction_handle *th, struct path * path, const struct cpu_key * key, struct item_head * ih, const char * body); -int reiserfs_paste_into_item (struct reiserfs_transaction_handle *th, +KSTATIC int reiserfs_paste_into_item (struct reiserfs_transaction_handle *th, struct path * path, const struct cpu_key * key, const char * body, int paste_size); -int reiserfs_cut_from_item (struct reiserfs_transaction_handle *th, +KSTATIC int reiserfs_cut_from_item (struct reiserfs_transaction_handle *th, struct path * path, struct cpu_key * key, struct inode * inode, struct page *page, loff_t new_file_size); -int reiserfs_delete_item (struct reiserfs_transaction_handle *th, +KSTATIC int reiserfs_delete_item (struct reiserfs_transaction_handle *th, struct path * path, const struct cpu_key * key, struct inode * inode, struct buffer_head * p_s_un_bh); -void reiserfs_delete_object (struct reiserfs_transaction_handle *th, struct inode * p_s_inode); -void reiserfs_do_truncate (struct reiserfs_transaction_handle *th, +KSTATIC void reiserfs_delete_object (struct reiserfs_transaction_handle *th, struct inode * p_s_inode); +KSTATIC void reiserfs_do_truncate (struct reiserfs_transaction_handle *th, struct inode * p_s_inode, struct page *, int update_timestamps); // @@ -1842,72 +1846,72 @@ int n_max_nr_buffers_to_return); */ -void padd_item (char * item, int total_length, int length); +KSTATIC void padd_item (char * item, int total_length, int length); /* inode.c */ -int reiserfs_prepare_write(struct file *, struct page *, unsigned, unsigned) ; -void reiserfs_truncate_file(struct inode *, int update_timestamps) ; -void make_cpu_key (struct cpu_key * cpu_key, const struct inode * inode, loff_t offset, +KSTATIC int reiserfs_prepare_write(struct file *, struct page *, unsigned, unsigned) ; +KSTATIC void reiserfs_truncate_file(struct inode *, int update_timestamps) ; +KSTATIC void make_cpu_key (struct cpu_key * cpu_key, const struct inode * inode, loff_t offset, int type, int key_length); -void make_le_item_head (struct item_head * ih, const struct cpu_key * key, +KSTATIC void make_le_item_head (struct item_head * ih, const struct cpu_key * key, int version, loff_t offset, int type, int length, int entry_count); /*void store_key (struct key * key); void forget_key (struct key * key);*/ -int reiserfs_get_block (struct inode * inode, long block, +KSTATIC int reiserfs_get_block (struct inode * inode, long block, struct buffer_head * bh_result, int create); -struct inode * reiserfs_iget (struct super_block * s, +KSTATIC struct inode * reiserfs_iget (struct super_block * s, const struct cpu_key * key); -void reiserfs_read_inode (struct inode * inode) ; -void reiserfs_read_inode2(struct inode * inode, void *p) ; -void reiserfs_delete_inode (struct inode * inode); +KSTATIC void reiserfs_read_inode (struct inode * inode) ; +KSTATIC void reiserfs_read_inode2(struct inode * inode, void *p) ; +KSTATIC void reiserfs_delete_inode (struct inode * inode); extern int reiserfs_notify_change(struct dentry * dentry, struct iattr * attr); -void reiserfs_write_inode (struct inode * inode, int) ; +KSTATIC void reiserfs_write_inode (struct inode * inode, int) ; /* nfsd support functions */ -struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, __u32 *fh, int len, int fhtype, int parent); -int reiserfs_dentry_to_fh(struct dentry *, __u32 *fh, int *lenp, int need_parent); +KSTATIC struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, __u32 *fh, int len, int fhtype, int parent); +KSTATIC int reiserfs_dentry_to_fh(struct dentry *, __u32 *fh, int *lenp, int need_parent); /* we don't mark inodes dirty, we just log them */ -void reiserfs_dirty_inode (struct inode * inode) ; +KSTATIC void reiserfs_dirty_inode (struct inode * inode) ; -struct inode * reiserfs_new_inode (struct reiserfs_transaction_handle *th, +KSTATIC struct inode * reiserfs_new_inode (struct reiserfs_transaction_handle *th, const struct inode * dir, int mode, const char * symname, int item_len, struct dentry *dentry, struct inode *inode, int * err); -int reiserfs_sync_inode (struct reiserfs_transaction_handle *th, struct inode * inode); -void reiserfs_update_sd (struct reiserfs_transaction_handle *th, struct inode * inode); -int reiserfs_inode_setattr(struct dentry *, struct iattr * attr); +KSTATIC int reiserfs_sync_inode (struct reiserfs_transaction_handle *th, struct inode * inode); +KSTATIC void reiserfs_update_sd (struct reiserfs_transaction_handle *th, struct inode * inode); +KSTATIC int reiserfs_inode_setattr(struct dentry *, struct iattr * attr); /* namei.c */ -inline void set_de_name_and_namelen (struct reiserfs_dir_entry * de); -int search_by_entry_key (struct super_block * sb, const struct cpu_key * key, +KSTATIC inline void set_de_name_and_namelen (struct reiserfs_dir_entry * de); +KSTATIC int search_by_entry_key (struct super_block * sb, const struct cpu_key * key, struct path * path, struct reiserfs_dir_entry * de); -struct dentry * reiserfs_lookup (struct inode * dir, struct dentry *dentry); -int reiserfs_create (struct inode * dir, struct dentry *dentry, int mode); -int reiserfs_mknod (struct inode * dir_inode, struct dentry *dentry, int mode, int rdev); -int reiserfs_mkdir (struct inode * dir, struct dentry *dentry, int mode); -int reiserfs_rmdir (struct inode * dir, struct dentry *dentry); -int reiserfs_unlink (struct inode * dir, struct dentry *dentry); -int reiserfs_symlink (struct inode * dir, struct dentry *dentry, const char * symname); -int reiserfs_link (struct dentry * old_dentry, struct inode * dir, struct dentry *dentry); -int reiserfs_rename (struct inode * old_dir, struct dentry *old_dentry, struct inode * new_dir, struct dentry *new_dentry); +KSTATIC struct dentry * reiserfs_lookup (struct inode * dir, struct dentry *dentry); +KSTATIC int reiserfs_create (struct inode * dir, struct dentry *dentry, int mode); +KSTATIC int reiserfs_mknod (struct inode * dir_inode, struct dentry *dentry, int mode, int rdev); +KSTATIC int reiserfs_mkdir (struct inode * dir, struct dentry *dentry, int mode); +KSTATIC int reiserfs_rmdir (struct inode * dir, struct dentry *dentry); +KSTATIC int reiserfs_unlink (struct inode * dir, struct dentry *dentry); +KSTATIC int reiserfs_symlink (struct inode * dir, struct dentry *dentry, const char * symname); +KSTATIC int reiserfs_link (struct dentry * old_dentry, struct inode * dir, struct dentry *dentry); +KSTATIC int reiserfs_rename (struct inode * old_dir, struct dentry *old_dentry, struct inode * new_dir, struct dentry *new_dentry); /* super.c */ -inline void reiserfs_mark_buffer_dirty (struct buffer_head * bh, int flag); -inline void reiserfs_mark_buffer_clean (struct buffer_head * bh); -void reiserfs_write_super (struct super_block * s); -void reiserfs_put_super (struct super_block * s); -int reiserfs_remount (struct super_block * s, int * flags, char * data); +KSTATIC inline void reiserfs_mark_buffer_dirty (struct buffer_head * bh, int flag); +KSTATIC inline void reiserfs_mark_buffer_clean (struct buffer_head * bh); +KSTATIC void reiserfs_write_super (struct super_block * s); +KSTATIC void reiserfs_put_super (struct super_block * s); +KSTATIC int reiserfs_remount (struct super_block * s, int * flags, char * data); /*int read_super_block (struct super_block * s, int size); int read_bitmaps (struct super_block * s); int read_old_bitmaps (struct super_block * s); int read_old_super_block (struct super_block * s, int size);*/ -struct super_block * reiserfs_read_super (struct super_block * s, void * data, int silent); -int reiserfs_statfs (struct super_block * s, struct statfs * buf); +KSTATIC struct super_block * reiserfs_read_super (struct super_block * s, void * data, int silent); +KSTATIC int reiserfs_statfs (struct super_block * s, struct statfs * buf); /* procfs.c */ @@ -1917,33 +1921,33 @@ #undef REISERFS_PROC_INFO #endif -int reiserfs_proc_info_init( struct super_block *sb ); -int reiserfs_proc_info_done( struct super_block *sb ); -struct proc_dir_entry *reiserfs_proc_register( struct super_block *sb, +KSTATIC int reiserfs_proc_info_init( struct super_block *sb ); +KSTATIC int reiserfs_proc_info_done( struct super_block *sb ); +KSTATIC struct proc_dir_entry *reiserfs_proc_register( struct super_block *sb, char *name, read_proc_t *func ); -void reiserfs_proc_unregister( struct super_block *sb, const char *name ); -struct proc_dir_entry *reiserfs_proc_register_global( char *name, +KSTATIC void reiserfs_proc_unregister( struct super_block *sb, const char *name ); +KSTATIC struct proc_dir_entry *reiserfs_proc_register_global( char *name, read_proc_t *func ); -void reiserfs_proc_unregister_global( const char *name ); -int reiserfs_proc_info_global_init( void ); -int reiserfs_proc_info_global_done( void ); -int reiserfs_proc_tail( int len, char *buffer, char **start, +KSTATIC void reiserfs_proc_unregister_global( const char *name ); +KSTATIC int reiserfs_proc_info_global_init( void ); +KSTATIC int reiserfs_proc_info_global_done( void ); +KSTATIC int reiserfs_proc_tail( int len, char *buffer, char **start, off_t offset, int count, int *eof ); -int reiserfs_global_version_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_global_version_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ); -int reiserfs_version_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_version_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ); -int reiserfs_super_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_super_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ); -int reiserfs_per_level_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_per_level_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ); -int reiserfs_bitmap_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_bitmap_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ); -int reiserfs_on_disk_super_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_on_disk_super_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ); -int reiserfs_oidmap_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_oidmap_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ); -int reiserfs_journal_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_journal_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ); #if defined( REISERFS_PROC_INFO ) @@ -1971,125 +1975,125 @@ #endif /* dir.c */ -extern struct inode_operations reiserfs_dir_inode_operations; -extern struct file_operations reiserfs_dir_operations; +KSTATIC struct inode_operations reiserfs_dir_inode_operations; +KSTATIC struct file_operations reiserfs_dir_operations; /* tail_conversion.c */ -int direct2indirect (struct reiserfs_transaction_handle *, struct inode *, struct path *, struct buffer_head *, loff_t); -int indirect2direct (struct reiserfs_transaction_handle *, struct inode *, struct page *, struct path *, const struct cpu_key *, loff_t, char *); -void reiserfs_unmap_buffer(struct buffer_head *) ; +KSTATIC int direct2indirect (struct reiserfs_transaction_handle *, struct inode *, struct path *, struct buffer_head *, loff_t); +KSTATIC int indirect2direct (struct reiserfs_transaction_handle *, struct inode *, struct page *, struct path *, const struct cpu_key *, loff_t, char *); +KSTATIC void reiserfs_unmap_buffer(struct buffer_head *) ; /* file.c */ -extern struct inode_operations reiserfs_file_inode_operations; -extern struct file_operations reiserfs_file_operations; -extern struct address_space_operations reiserfs_address_space_operations ; -int get_new_buffer (struct reiserfs_transaction_handle *th, struct buffer_head *, +KSTATIC struct inode_operations reiserfs_file_inode_operations; +KSTATIC struct file_operations reiserfs_file_operations; +KSTATIC struct address_space_operations reiserfs_address_space_operations ; +KSTATIC int get_new_buffer (struct reiserfs_transaction_handle *th, struct buffer_head *, struct buffer_head **, struct path *); /* buffer2.c */ -struct buffer_head * reiserfs_getblk (kdev_t n_dev, int n_block, int n_size); -void wait_buffer_until_released (const struct buffer_head * bh); -struct buffer_head * reiserfs_bread (struct super_block *super, int n_block, +KSTATIC struct buffer_head * reiserfs_getblk (kdev_t n_dev, int n_block, int n_size); +KSTATIC void wait_buffer_until_released (const struct buffer_head * bh); +KSTATIC struct buffer_head * reiserfs_bread (struct super_block *super, int n_block, int n_size); /* fix_nodes.c */ -void * reiserfs_kmalloc (size_t size, int flags, struct super_block * s); -void reiserfs_kfree (const void * vp, size_t size, struct super_block * s); -int fix_nodes (int n_op_mode, struct tree_balance * p_s_tb, +KSTATIC void * reiserfs_kmalloc (size_t size, int flags, struct super_block * s); +KSTATIC void reiserfs_kfree (const void * vp, size_t size, struct super_block * s); +KSTATIC int fix_nodes (int n_op_mode, struct tree_balance * p_s_tb, struct item_head * p_s_ins_ih, const void *); -void unfix_nodes (struct tree_balance *); -void free_buffers_in_tb (struct tree_balance * p_s_tb); +KSTATIC void unfix_nodes (struct tree_balance *); +KSTATIC void free_buffers_in_tb (struct tree_balance * p_s_tb); /* prints.c */ -void reiserfs_panic (struct super_block * s, const char * fmt, ...) +KSTATIC void reiserfs_panic (struct super_block * s, const char * fmt, ...) __attribute__ ( ( noreturn ) );/* __attribute__( ( format ( printf, 2, 3 ) ) ) */ -void reiserfs_warning (const char * fmt, ...); +KSTATIC void reiserfs_warning (const char * fmt, ...); /* __attribute__( ( format ( printf, 1, 2 ) ) ); */ -void reiserfs_debug (struct super_block *s, int level, const char * fmt, ...); +KSTATIC void reiserfs_debug (struct super_block *s, int level, const char * fmt, ...); /* __attribute__( ( format ( printf, 3, 4 ) ) ); */ -void print_virtual_node (struct virtual_node * vn); -void print_indirect_item (struct buffer_head * bh, int item_num); -void store_print_tb (struct tree_balance * tb); -void print_cur_tb (char * mes); -void print_de (struct reiserfs_dir_entry * de); -void print_bi (struct buffer_info * bi, char * mes); +KSTATIC void print_virtual_node (struct virtual_node * vn); +KSTATIC void print_indirect_item (struct buffer_head * bh, int item_num); +KSTATIC void store_print_tb (struct tree_balance * tb); +KSTATIC void print_cur_tb (char * mes); +KSTATIC void print_de (struct reiserfs_dir_entry * de); +KSTATIC void print_bi (struct buffer_info * bi, char * mes); #define PRINT_LEAF_ITEMS 1 /* print all items */ #define PRINT_DIRECTORY_ITEMS 2 /* print directory items */ #define PRINT_DIRECT_ITEMS 4 /* print contents of direct items */ -void print_block (struct buffer_head * bh, ...); -void print_path (struct tree_balance * tb, struct path * path); -void print_bmap (struct super_block * s, int silent); -void print_bmap_block (int i, char * data, int size, int silent); +KSTATIC void print_block (struct buffer_head * bh, ...); +KSTATIC void print_path (struct tree_balance * tb, struct path * path); +KSTATIC void print_bmap (struct super_block * s, int silent); +KSTATIC void print_bmap_block (int i, char * data, int size, int silent); /*void print_super_block (struct super_block * s, char * mes);*/ -void print_objectid_map (struct super_block * s); -void print_block_head (struct buffer_head * bh, char * mes); -void check_leaf (struct buffer_head * bh); -void check_internal (struct buffer_head * bh); -void print_statistics (struct super_block * s); +KSTATIC void print_objectid_map (struct super_block * s); +KSTATIC void print_block_head (struct buffer_head * bh, char * mes); +KSTATIC void check_leaf (struct buffer_head * bh); +KSTATIC void check_internal (struct buffer_head * bh); +KSTATIC void print_statistics (struct super_block * s); /* lbalance.c */ -int leaf_move_items (int shift_mode, struct tree_balance * tb, int mov_num, int mov_bytes, struct buffer_head * Snew); -int leaf_shift_left (struct tree_balance * tb, int shift_num, int shift_bytes); -int leaf_shift_right (struct tree_balance * tb, int shift_num, int shift_bytes); -void leaf_delete_items (struct buffer_info * cur_bi, int last_first, int first, int del_num, int del_bytes); -void leaf_insert_into_buf (struct buffer_info * bi, int before, +KSTATIC int leaf_move_items (int shift_mode, struct tree_balance * tb, int mov_num, int mov_bytes, struct buffer_head * Snew); +KSTATIC int leaf_shift_left (struct tree_balance * tb, int shift_num, int shift_bytes); +KSTATIC int leaf_shift_right (struct tree_balance * tb, int shift_num, int shift_bytes); +KSTATIC void leaf_delete_items (struct buffer_info * cur_bi, int last_first, int first, int del_num, int del_bytes); +KSTATIC void leaf_insert_into_buf (struct buffer_info * bi, int before, struct item_head * inserted_item_ih, const char * inserted_item_body, int zeros_number); -void leaf_paste_in_buffer (struct buffer_info * bi, int pasted_item_num, +KSTATIC void leaf_paste_in_buffer (struct buffer_info * bi, int pasted_item_num, int pos_in_item, int paste_size, const char * body, int zeros_number); -void leaf_cut_from_buffer (struct buffer_info * bi, int cut_item_num, int pos_in_item, +KSTATIC void leaf_cut_from_buffer (struct buffer_info * bi, int cut_item_num, int pos_in_item, int cut_size); -void leaf_paste_entries (struct buffer_head * bh, int item_num, int before, +KSTATIC void leaf_paste_entries (struct buffer_head * bh, int item_num, int before, int new_entry_count, struct reiserfs_de_head * new_dehs, const char * records, int paste_size); /* ibalance.c */ -int balance_internal (struct tree_balance * , int, int, struct item_head * , +KSTATIC int balance_internal (struct tree_balance * , int, int, struct item_head * , struct buffer_head **); /* do_balance.c */ -inline void do_balance_mark_leaf_dirty (struct tree_balance * tb, +KSTATIC inline void do_balance_mark_leaf_dirty (struct tree_balance * tb, struct buffer_head * bh, int flag); #define do_balance_mark_internal_dirty do_balance_mark_leaf_dirty #define do_balance_mark_sb_dirty do_balance_mark_leaf_dirty -void do_balance (struct tree_balance * tb, struct item_head * ih, +KSTATIC void do_balance (struct tree_balance * tb, struct item_head * ih, const char * body, int flag); -void reiserfs_invalidate_buffer (struct tree_balance * tb, struct buffer_head * bh); +KSTATIC void reiserfs_invalidate_buffer (struct tree_balance * tb, struct buffer_head * bh); -int get_left_neighbor_position (struct tree_balance * tb, int h); -int get_right_neighbor_position (struct tree_balance * tb, int h); -void replace_key (struct tree_balance * tb, struct buffer_head *, int, struct buffer_head *, int); -void replace_lkey (struct tree_balance *, int, struct item_head *); -void replace_rkey (struct tree_balance *, int, struct item_head *); -void make_empty_node (struct buffer_info *); -struct buffer_head * get_FEB (struct tree_balance *); +KSTATIC int get_left_neighbor_position (struct tree_balance * tb, int h); +KSTATIC int get_right_neighbor_position (struct tree_balance * tb, int h); +KSTATIC void replace_key (struct tree_balance * tb, struct buffer_head *, int, struct buffer_head *, int); +KSTATIC void replace_lkey (struct tree_balance *, int, struct item_head *); +KSTATIC void replace_rkey (struct tree_balance *, int, struct item_head *); +KSTATIC void make_empty_node (struct buffer_info *); +KSTATIC struct buffer_head * get_FEB (struct tree_balance *); /* bitmap.c */ -int is_reusable (struct super_block * s, unsigned long block, int bit_value); -void reiserfs_free_block (struct reiserfs_transaction_handle *th, unsigned long); -int reiserfs_new_blocknrs (struct reiserfs_transaction_handle *th, +KSTATIC int is_reusable (struct super_block * s, unsigned long block, int bit_value); +KSTATIC void reiserfs_free_block (struct reiserfs_transaction_handle *th, unsigned long); +KSTATIC int reiserfs_new_blocknrs (struct reiserfs_transaction_handle *th, unsigned long * pblocknrs, unsigned long start_from, int amount_needed); -int reiserfs_new_unf_blocknrs (struct reiserfs_transaction_handle *th, +KSTATIC int reiserfs_new_unf_blocknrs (struct reiserfs_transaction_handle *th, unsigned long * pblocknr, unsigned long start_from); #ifdef REISERFS_PREALLOCATE -int reiserfs_new_unf_blocknrs2 (struct reiserfs_transaction_handle *th, +KSTATIC int reiserfs_new_unf_blocknrs2 (struct reiserfs_transaction_handle *th, struct inode * inode, unsigned long * pblocknr, unsigned long start_from); -void reiserfs_discard_prealloc (struct reiserfs_transaction_handle *th, +KSTATIC void reiserfs_discard_prealloc (struct reiserfs_transaction_handle *th, struct inode * inode); -void reiserfs_discard_all_prealloc (struct reiserfs_transaction_handle *th); +KSTATIC void reiserfs_discard_all_prealloc (struct reiserfs_transaction_handle *th); #endif /* hashes.c */ -__u32 keyed_hash (const signed char *msg, int len); -__u32 yura_hash (const signed char *msg, int len); -__u32 r5_hash (const signed char *msg, int len); +KSTATIC __u32 keyed_hash (const signed char *msg, int len); +KSTATIC __u32 yura_hash (const signed char *msg, int len); +KSTATIC __u32 r5_hash (const signed char *msg, int len); /* version.c */ -const char *reiserfs_get_version_string(void) CONSTF; +KSTATIC const char *reiserfs_get_version_string(void) CONSTF; /* the ext2 bit routines adjust for big or little endian as ** appropriate for the arch, so in our laziness we use them rather @@ -2194,9 +2198,9 @@ } /* prototypes from ioctl.c */ -int reiserfs_ioctl (struct inode * inode, struct file * filp, +KSTATIC int reiserfs_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, unsigned long arg); -int reiserfs_unpack (struct inode * inode, struct file * filp); +KSTATIC int reiserfs_unpack (struct inode * inode, struct file * filp); /* ioctl's command */ #define REISERFS_IOC_UNPACK _IOW(0xCD,1,long) diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/include/linux/sysrq.h linux-e2all/include/linux/sysrq.h --- linux-2.4.17-pre2/include/linux/sysrq.h Sun Sep 30 19:26:42 2001 +++ linux-e2all/include/linux/sysrq.h Sun Dec 2 12:48:21 2001 @@ -10,6 +10,8 @@ * overhauled to use key registration * based upon discusions in irc://irc.openprojects.net/#kernelnewbies */ +#ifndef __LINUX_SYSRQ_H__ +#define __LINUX_SYSRQ_H__ #include @@ -117,3 +119,5 @@ #else #define CHECK_EMERGENCY_SYNC #endif + +#endif /* __LINUX_SYSRQ_H__ */ diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/kernel/Makefile linux-e2all/kernel/Makefile --- linux-2.4.17-pre2/kernel/Makefile Mon Sep 17 04:22:40 2001 +++ linux-e2all/kernel/Makefile Sun Dec 2 12:43:34 2001 @@ -9,12 +9,17 @@ O_TARGET := kernel.o +ifdef CONFIG_FINAL +export-objs = kernel_all.o +obj-y = kernel_all.o +else export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o printk.o obj-y = sched.o dma.o fork.o exec_domain.o panic.o printk.o \ module.o exit.o itimer.o info.o time.o softirq.o resource.o \ sysctl.o acct.o capability.o ptrace.o timer.o user.o \ signal.o sys.o kmod.o context.o +endif obj-$(CONFIG_UID16) += uid16.o obj-$(CONFIG_MODULES) += ksyms.o diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/kernel/kernel_all.c linux-e2all/kernel/kernel_all.c --- linux-2.4.17-pre2/kernel/kernel_all.c Thu Jan 1 00:00:00 1970 +++ linux-e2all/kernel/kernel_all.c Sun Dec 2 12:43:11 2001 @@ -0,0 +1,24 @@ +#include +#include "acct.c" +#include "capability.c" +#include "context.c" +#include "dma.c" +#include "exec_domain.c" +#include "exit.c" +#include "fork.c" +#include "info.c" +#include "itimer.c" +#include "kmod.c" +#include "module.c" +#include "panic.c" +#include "printk.c" +#include "ptrace.c" +#include "resource.c" +#include "sched.c" +#include "signal.c" +#include "softirq.c" +#include "sys.c" +#include "sysctl.c" +#include "time.c" +#include "timer.c" +#include "user.c" diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/kernel/signal.c linux-e2all/kernel/signal.c --- linux-2.4.17-pre2/kernel/signal.c Thu Nov 22 00:26:27 2001 +++ linux-e2all/kernel/signal.c Sun Dec 2 12:44:30 2001 @@ -30,8 +30,8 @@ static kmem_cache_t *sigqueue_cachep; -atomic_t nr_queued_signals; -int max_queued_signals = 1024; +KSTATIC atomic_t nr_queued_signals; +KSTATIC int max_queued_signals = 1024; void __init signals_init(void) { diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/kernel/sysctl.c linux-e2all/kernel/sysctl.c --- linux-2.4.17-pre2/kernel/sysctl.c Mon Nov 26 13:29:17 2001 +++ linux-e2all/kernel/sysctl.c Sun Dec 2 12:45:54 2001 @@ -45,7 +45,8 @@ extern int bdf_prm[], bdflush_min[], bdflush_max[]; extern int sysctl_overcommit_memory; extern int max_threads; -extern int nr_queued_signals, max_queued_signals; +KSTATIC atomic_t nr_queued_signals; +KSTATIC int max_queued_signals; extern int sysrq_enabled; extern int core_uses_pid; extern int cad_pid; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/Makefile linux-e2all/fs/ext2/Makefile --- linux-2.4.17-pre2/fs/ext2/Makefile Thu Oct 11 15:05:18 2001 +++ linux-e2all/fs/ext2/Makefile Sun Dec 2 11:44:08 2001 @@ -9,8 +9,14 @@ O_TARGET := ext2.o + +ifdef CONFIG_FINAL +obj-y := ext2_all.o +else obj-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ ioctl.o namei.o super.o symlink.o +endif + obj-m := $(O_TARGET) include $(TOPDIR)/Rules.make diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/balloc.c linux-e2all/fs/ext2/balloc.c --- linux-2.4.17-pre2/fs/ext2/balloc.c Fri Oct 5 19:23:53 2001 +++ linux-e2all/fs/ext2/balloc.c Sun Dec 2 11:46:50 2001 @@ -35,7 +35,7 @@ #define in_range(b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) -struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb, +KSTATIC struct ext2_group_desc * ext2_get_group_desc(struct super_block * sb, unsigned int block_group, struct buffer_head ** bh) { @@ -248,7 +248,7 @@ } /* Free given blocks, update quota and i_blocks field */ -void ext2_free_blocks (struct inode * inode, unsigned long block, +KSTATIC void ext2_free_blocks (struct inode * inode, unsigned long block, unsigned long count) { struct buffer_head * bh; @@ -354,7 +354,7 @@ * bitmap, and then for any free bit if that fails. * This function also updates quota and i_blocks field. */ -int ext2_new_block (struct inode * inode, unsigned long goal, +KSTATIC int ext2_new_block (struct inode * inode, unsigned long goal, u32 * prealloc_count, u32 * prealloc_block, int * err) { struct buffer_head * bh; @@ -614,7 +614,7 @@ } -unsigned long ext2_count_free_blocks (struct super_block * sb) +KSTATIC unsigned long ext2_count_free_blocks (struct super_block * sb) { #ifdef EXT2FS_DEBUG struct ext2_super_block * es; @@ -673,7 +673,7 @@ } } -int ext2_group_sparse(int group) +KSTATIC int ext2_group_sparse(int group) { return (test_root(group, 3) || test_root(group, 5) || test_root(group, 7)); @@ -687,7 +687,7 @@ * Return the number of blocks used by the superblock (primary or backup) * in this group. Currently this will be only 0 or 1. */ -int ext2_bg_has_super(struct super_block *sb, int group) +KSTATIC int ext2_bg_has_super(struct super_block *sb, int group) { if (EXT2_HAS_RO_COMPAT_FEATURE(sb,EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)&& !ext2_group_sparse(group)) @@ -704,7 +704,7 @@ * (primary or backup) in this group. In the future there may be a * different number of descriptor blocks in each group. */ -unsigned long ext2_bg_num_gdb(struct super_block *sb, int group) +KSTATIC unsigned long ext2_bg_num_gdb(struct super_block *sb, int group) { if (EXT2_HAS_RO_COMPAT_FEATURE(sb,EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)&& !ext2_group_sparse(group)) @@ -714,7 +714,7 @@ #ifdef CONFIG_EXT2_CHECK /* Called at mount-time, super-block is locked */ -void ext2_check_blocks_bitmap (struct super_block * sb) +KSTATIC void ext2_check_blocks_bitmap (struct super_block * sb) { struct buffer_head * bh; struct ext2_super_block * es; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/bitmap.c linux-e2all/fs/ext2/bitmap.c --- linux-2.4.17-pre2/fs/ext2/bitmap.c Wed Sep 27 20:41:33 2000 +++ linux-e2all/fs/ext2/bitmap.c Sun Dec 2 11:46:50 2001 @@ -10,10 +10,11 @@ #include #include +#ifdef EXT2FS_DEBUG static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; -unsigned long ext2_count_free (struct buffer_head * map, unsigned int numchars) +KSTATIC unsigned long ext2_count_free (struct buffer_head * map, unsigned int numchars) { unsigned int i; unsigned long sum = 0; @@ -25,3 +26,5 @@ nibblemap[(map->b_data[i] >> 4) & 0xf]; return (sum); } + +#endif /* EXT2FS_DEBUG */ diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/dir.c linux-e2all/fs/ext2/dir.c --- linux-2.4.17-pre2/fs/ext2/dir.c Mon Sep 17 20:16:30 2001 +++ linux-e2all/fs/ext2/dir.c Sun Dec 2 11:46:50 2001 @@ -297,7 +297,7 @@ * (as a parameter - res_dir). Page is returned mapped and unlocked. * Entry is guaranteed to be valid. */ -struct ext2_dir_entry_2 * ext2_find_entry (struct inode * dir, +KSTATIC struct ext2_dir_entry_2 * ext2_find_entry (struct inode * dir, struct dentry *dentry, struct page ** res_page) { const char *name = dentry->d_name.name; @@ -340,7 +340,7 @@ return de; } -struct ext2_dir_entry_2 * ext2_dotdot (struct inode *dir, struct page **p) +KSTATIC struct ext2_dir_entry_2 * ext2_dotdot (struct inode *dir, struct page **p) { struct page *page = ext2_get_page(dir, 0); ext2_dirent *de = NULL; @@ -352,7 +352,7 @@ return de; } -ino_t ext2_inode_by_name(struct inode * dir, struct dentry *dentry) +KSTATIC ino_t ext2_inode_by_name(struct inode * dir, struct dentry *dentry) { ino_t res = 0; struct ext2_dir_entry_2 * de; @@ -368,7 +368,7 @@ } /* Releases the page */ -void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de, +KSTATIC void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de, struct page *page, struct inode *inode) { unsigned from = (char *) de - (char *) page_address(page); @@ -391,7 +391,7 @@ /* * Parent is locked. */ -int ext2_add_link (struct dentry *dentry, struct inode *inode) +KSTATIC int ext2_add_link (struct dentry *dentry, struct inode *inode) { struct inode *dir = dentry->d_parent->d_inode; const char *name = dentry->d_name.name; @@ -465,7 +465,7 @@ * ext2_delete_entry deletes a directory entry by merging it with the * previous entry. Page is up-to-date. Releases the page. */ -int ext2_delete_entry (struct ext2_dir_entry_2 * dir, struct page * page ) +KSTATIC int ext2_delete_entry (struct ext2_dir_entry_2 * dir, struct page * page ) { struct address_space *mapping = page->mapping; struct inode *inode = mapping->host; @@ -500,7 +500,7 @@ /* * Set the first fragment of directory. */ -int ext2_make_empty(struct inode *inode, struct inode *parent) +KSTATIC int ext2_make_empty(struct inode *inode, struct inode *parent) { struct address_space *mapping = inode->i_mapping; struct page *page = grab_cache_page(mapping, 0); @@ -541,7 +541,7 @@ /* * routine to check that the specified directory is empty (for rmdir) */ -int ext2_empty_dir (struct inode * inode) +KSTATIC int ext2_empty_dir (struct inode * inode) { struct page *page = NULL; unsigned long i, npages = dir_pages(inode); @@ -583,7 +583,7 @@ return 0; } -struct file_operations ext2_dir_operations = { +KSTATIC struct file_operations ext2_dir_operations = { read: generic_read_dir, readdir: ext2_readdir, ioctl: ext2_ioctl, diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/ext2_all.c linux-e2all/fs/ext2/ext2_all.c --- linux-2.4.17-pre2/fs/ext2/ext2_all.c Thu Jan 1 00:00:00 1970 +++ linux-e2all/fs/ext2/ext2_all.c Sun Dec 2 11:46:50 2001 @@ -0,0 +1,12 @@ +#define KSTATIC static +#include "balloc.c" +#include "bitmap.c" +#include "dir.c" +#include "file.c" +#include "fsync.c" +#include "ialloc.c" +#include "inode.c" +#include "ioctl.c" +#include "namei.c" +#include "super.c" +#include "symlink.c" diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/file.c linux-e2all/fs/ext2/file.c --- linux-2.4.17-pre2/fs/ext2/file.c Thu Oct 11 15:05:18 2001 +++ linux-e2all/fs/ext2/file.c Sun Dec 2 11:46:50 2001 @@ -38,7 +38,7 @@ * We have mostly NULL's here: the current defaults are ok for * the ext2 filesystem. */ -struct file_operations ext2_file_operations = { +KSTATIC struct file_operations ext2_file_operations = { llseek: generic_file_llseek, read: generic_file_read, write: generic_file_write, @@ -49,6 +49,6 @@ fsync: ext2_sync_file, }; -struct inode_operations ext2_file_inode_operations = { +KSTATIC struct inode_operations ext2_file_inode_operations = { truncate: ext2_truncate, }; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/fsync.c linux-e2all/fs/ext2/fsync.c --- linux-2.4.17-pre2/fs/ext2/fsync.c Mon Sep 17 20:16:30 2001 +++ linux-e2all/fs/ext2/fsync.c Sun Dec 2 11:46:50 2001 @@ -33,13 +33,13 @@ * even pass file to fsync ? */ -int ext2_sync_file(struct file * file, struct dentry *dentry, int datasync) +KSTATIC int ext2_sync_file(struct file * file, struct dentry *dentry, int datasync) { struct inode *inode = dentry->d_inode; return ext2_fsync_inode(inode, datasync); } -int ext2_fsync_inode(struct inode *inode, int datasync) +KSTATIC int ext2_fsync_inode(struct inode *inode, int datasync) { int err; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/ialloc.c linux-e2all/fs/ext2/ialloc.c --- linux-2.4.17-pre2/fs/ext2/ialloc.c Sun Nov 11 17:59:56 2001 +++ linux-e2all/fs/ext2/ialloc.c Sun Dec 2 11:46:50 2001 @@ -147,7 +147,7 @@ * though), and then we'd have two inodes sharing the * same inode number and space on the harddisk. */ -void ext2_free_inode (struct inode * inode) +KSTATIC void ext2_free_inode (struct inode * inode) { struct super_block * sb = inode->i_sb; int is_directory; @@ -312,7 +312,7 @@ return group; } -struct inode * ext2_new_inode (const struct inode * dir, int mode) +KSTATIC struct inode * ext2_new_inode (const struct inode * dir, int mode) { struct super_block * sb; struct buffer_head * bh; @@ -437,7 +437,7 @@ goto repeat; } -unsigned long ext2_count_free_inodes (struct super_block * sb) +KSTATIC unsigned long ext2_count_free_inodes (struct super_block * sb) { #ifdef EXT2FS_DEBUG struct ext2_super_block * es; @@ -474,7 +474,7 @@ #ifdef CONFIG_EXT2_CHECK /* Called at mount-time, super-block is locked */ -void ext2_check_inodes_bitmap (struct super_block * sb) +KSTATIC void ext2_check_inodes_bitmap (struct super_block * sb) { struct ext2_super_block * es = sb->u.ext2_sb.s_es; unsigned long desc_count = 0, bitmap_count = 0; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/inode.c linux-e2all/fs/ext2/inode.c --- linux-2.4.17-pre2/fs/ext2/inode.c Wed Nov 21 22:07:25 2001 +++ linux-e2all/fs/ext2/inode.c Sun Dec 2 11:46:50 2001 @@ -41,7 +41,7 @@ /* * Called at each iput() */ -void ext2_put_inode (struct inode * inode) +KSTATIC void ext2_put_inode (struct inode * inode) { ext2_discard_prealloc (inode); } @@ -49,7 +49,7 @@ /* * Called at the last iput() if i_nlink is zero. */ -void ext2_delete_inode (struct inode * inode) +KSTATIC void ext2_delete_inode (struct inode * inode) { lock_kernel(); @@ -72,7 +72,7 @@ clear_inode(inode); /* We must guarantee clearing of inode... */ } -void ext2_discard_prealloc (struct inode * inode) +KSTATIC void ext2_discard_prealloc (struct inode * inode) { #ifdef EXT2_PREALLOCATE lock_kernel(); @@ -596,7 +596,7 @@ { return generic_direct_IO(rw, inode, iobuf, blocknr, blocksize, ext2_get_block); } -struct address_space_operations ext2_aops = { +KSTATIC struct address_space_operations ext2_aops = { readpage: ext2_readpage, writepage: ext2_writepage, sync_page: block_sync_page, @@ -786,7 +786,7 @@ ext2_free_data(inode, p, q); } -void ext2_truncate (struct inode * inode) +KSTATIC void ext2_truncate (struct inode * inode) { u32 *i_data = inode->u.ext2_i.i_data; int addr_per_block = EXT2_ADDR_PER_BLOCK(inode->i_sb); @@ -879,7 +879,7 @@ mark_inode_dirty(inode); } -void ext2_read_inode (struct inode * inode) +KSTATIC void ext2_read_inode (struct inode * inode) { struct buffer_head * bh; struct ext2_inode * raw_inode; @@ -1148,14 +1148,14 @@ return err; } -void ext2_write_inode (struct inode * inode, int wait) +KSTATIC void ext2_write_inode (struct inode * inode, int wait) { lock_kernel(); ext2_update_inode (inode, wait); unlock_kernel(); } -int ext2_sync_inode (struct inode *inode) +KSTATIC int ext2_sync_inode (struct inode *inode) { return ext2_update_inode (inode, 1); } diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/ioctl.c linux-e2all/fs/ext2/ioctl.c --- linux-2.4.17-pre2/fs/ext2/ioctl.c Wed Sep 27 20:41:33 2000 +++ linux-e2all/fs/ext2/ioctl.c Sun Dec 2 11:46:50 2001 @@ -13,7 +13,7 @@ #include -int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, +KSTATIC int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, unsigned long arg) { unsigned int flags; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/namei.c linux-e2all/fs/ext2/namei.c --- linux-2.4.17-pre2/fs/ext2/namei.c Thu Oct 4 05:57:36 2001 +++ linux-e2all/fs/ext2/namei.c Sun Dec 2 11:46:50 2001 @@ -335,7 +335,7 @@ return err; } -struct inode_operations ext2_dir_inode_operations = { +KSTATIC struct inode_operations ext2_dir_inode_operations = { create: ext2_create, lookup: ext2_lookup, link: ext2_link, diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/super.c linux-e2all/fs/ext2/super.c --- linux-2.4.17-pre2/fs/ext2/super.c Sat Dec 1 04:16:03 2001 +++ linux-e2all/fs/ext2/super.c Sun Dec 2 11:46:50 2001 @@ -33,7 +33,7 @@ static char error_buf[1024]; -void ext2_error (struct super_block * sb, const char * function, +KSTATIC void ext2_error (struct super_block * sb, const char * function, const char * fmt, ...) { va_list args; @@ -63,7 +63,7 @@ } } -NORET_TYPE void ext2_panic (struct super_block * sb, const char * function, +NORET_TYPE KSTATIC void ext2_panic (struct super_block * sb, const char * function, const char * fmt, ...) { va_list args; @@ -83,7 +83,7 @@ bdevname(sb->s_dev), function, error_buf); } -void ext2_warning (struct super_block * sb, const char * function, +KSTATIC void ext2_warning (struct super_block * sb, const char * function, const char * fmt, ...) { va_list args; @@ -95,7 +95,7 @@ bdevname(sb->s_dev), function, error_buf); } -void ext2_update_dynamic_rev(struct super_block *sb) +KSTATIC void ext2_update_dynamic_rev(struct super_block *sb) { struct ext2_super_block *es = EXT2_SB(sb)->s_es; @@ -120,7 +120,7 @@ */ } -void ext2_put_super (struct super_block * sb) +KSTATIC void ext2_put_super (struct super_block * sb) { int db_count; int i; @@ -397,7 +397,7 @@ return res; } -struct super_block * ext2_read_super (struct super_block * sb, void * data, +KSTATIC struct super_block * ext2_read_super (struct super_block * sb, void * data, int silent) { struct buffer_head * bh; @@ -685,7 +685,7 @@ * set s_state to EXT2_VALID_FS after some corrections. */ -void ext2_write_super (struct super_block * sb) +KSTATIC void ext2_write_super (struct super_block * sb) { struct ext2_super_block * es; @@ -704,7 +704,7 @@ sb->s_dirt = 0; } -int ext2_remount (struct super_block * sb, int * flags, char * data) +KSTATIC int ext2_remount (struct super_block * sb, int * flags, char * data) { struct ext2_super_block * es; unsigned short resuid = sb->u.ext2_sb.s_resuid; @@ -758,7 +758,7 @@ return 0; } -int ext2_statfs (struct super_block * sb, struct statfs * buf) +KSTATIC int ext2_statfs (struct super_block * sb, struct statfs * buf) { unsigned long overhead; int i; @@ -820,5 +820,5 @@ EXPORT_NO_SYMBOLS; -module_init(init_ext2_fs) -module_exit(exit_ext2_fs) +module_init(init_ext2_fs); +module_exit(exit_ext2_fs); diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/ext2/symlink.c linux-e2all/fs/ext2/symlink.c --- linux-2.4.17-pre2/fs/ext2/symlink.c Wed Sep 27 20:41:33 2000 +++ linux-e2all/fs/ext2/symlink.c Sun Dec 2 11:46:50 2001 @@ -32,7 +32,7 @@ return vfs_follow_link(nd, s); } -struct inode_operations ext2_fast_symlink_inode_operations = { +KSTATIC struct inode_operations ext2_fast_symlink_inode_operations = { readlink: ext2_readlink, follow_link: ext2_follow_link, }; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/Makefile linux-e2all/fs/reiserfs/Makefile --- linux-2.4.17-pre2/fs/reiserfs/Makefile Wed Nov 21 17:56:28 2001 +++ linux-e2all/fs/reiserfs/Makefile Sun Dec 2 12:09:32 2001 @@ -8,8 +8,13 @@ # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := reiserfs.o + +ifdef CONFIG_FINAL +obj-y := reiserfs_all.o +else obj-y := bitmap.o do_balan.o namei.o inode.o file.o dir.o fix_node.o super.o prints.o objectid.o \ lbalance.o ibalance.o stree.o hashes.o buffer2.o tail_conversion.o journal.o resize.o tail_conversion.o version.o item_ops.o ioctl.o procfs.o +endif obj-m := $(O_TARGET) diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/bitmap.c linux-e2all/fs/reiserfs/bitmap.c --- linux-2.4.17-pre2/fs/reiserfs/bitmap.c Sat Dec 1 04:16:03 2001 +++ linux-e2all/fs/reiserfs/bitmap.c Sun Dec 2 12:07:49 2001 @@ -17,7 +17,7 @@ ** this checks, that block can be reused, and it has correct state ** (free or busy) */ -int is_reusable (struct super_block * s, unsigned long block, int bit_value) +KSTATIC int is_reusable (struct super_block * s, unsigned long block, int bit_value) { int i, j; @@ -84,7 +84,7 @@ to free a list of blocks at once. -Hans */ /* I wonder if it would be less modest now that we use journaling. -Hans */ -void reiserfs_free_block (struct reiserfs_transaction_handle *th, unsigned long block) +KSTATIC void reiserfs_free_block (struct reiserfs_transaction_handle *th, unsigned long block) { struct super_block * s = th->t_super; struct reiserfs_super_block * rs; @@ -429,14 +429,14 @@ } // this is called only by get_empty_nodes -int reiserfs_new_blocknrs (struct reiserfs_transaction_handle *th, unsigned long * free_blocknrs, +KSTATIC int reiserfs_new_blocknrs (struct reiserfs_transaction_handle *th, unsigned long * free_blocknrs, unsigned long search_start, int amount_needed) { return do_reiserfs_new_blocknrs(th, free_blocknrs, search_start, amount_needed, 0/*priority*/, 0/*for_formatted*/, 0/*for_prealloc */) ; } // called by get_new_buffer and by reiserfs_get_block with amount_needed == 1 -int reiserfs_new_unf_blocknrs(struct reiserfs_transaction_handle *th, unsigned long * free_blocknrs, +KSTATIC int reiserfs_new_unf_blocknrs(struct reiserfs_transaction_handle *th, unsigned long * free_blocknrs, unsigned long search_start) { return do_reiserfs_new_blocknrs(th, free_blocknrs, search_start, 1/*amount_needed*/, @@ -468,7 +468,7 @@ ** blocks near the search_start again. ** */ -int reiserfs_new_unf_blocknrs2 (struct reiserfs_transaction_handle *th, +KSTATIC int reiserfs_new_unf_blocknrs2 (struct reiserfs_transaction_handle *th, struct inode * p_s_inode, unsigned long * free_blocknrs, unsigned long search_start) @@ -675,7 +675,7 @@ } -void reiserfs_discard_prealloc (struct reiserfs_transaction_handle *th, +KSTATIC void reiserfs_discard_prealloc (struct reiserfs_transaction_handle *th, struct inode * inode) { #ifdef CONFIG_REISERFS_CHECK @@ -687,7 +687,7 @@ } } -void reiserfs_discard_all_prealloc (struct reiserfs_transaction_handle *th) +KSTATIC void reiserfs_discard_all_prealloc (struct reiserfs_transaction_handle *th) { struct list_head * plist = &SB_JOURNAL(th->t_super)->j_prealloc_list; struct inode * inode; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/buffer2.c linux-e2all/fs/reiserfs/buffer2.c --- linux-2.4.17-pre2/fs/reiserfs/buffer2.c Fri Nov 9 22:18:25 2001 +++ linux-e2all/fs/reiserfs/buffer2.c Sun Dec 2 12:07:11 2001 @@ -34,7 +34,7 @@ hold we did free all buffers in tree balance structure (get_empty_nodes and get_nodes_for_preserving) or in path structure only (get_new_buffer) just before calling this */ -void wait_buffer_until_released (const struct buffer_head * bh) +KSTATIC void wait_buffer_until_released (const struct buffer_head * bh) { int repeat_counter = 0; @@ -64,7 +64,7 @@ block. */ /* The function is NOT SCHEDULE-SAFE! */ -struct buffer_head * reiserfs_bread (struct super_block *super, int n_block, int n_size) +KSTATIC struct buffer_head * reiserfs_bread (struct super_block *super, int n_block, int n_size) { struct buffer_head *result; PROC_EXP( unsigned int ctx_switches = kstat.context_swtch ); @@ -84,7 +84,7 @@ actually get the block off of the disk. */ /* The function is NOT SCHEDULE-SAFE! */ -struct buffer_head * reiserfs_getblk (kdev_t n_dev, int n_block, int n_size) +KSTATIC struct buffer_head * reiserfs_getblk (kdev_t n_dev, int n_block, int n_size) { return getblk (n_dev, n_block, n_size); } @@ -178,7 +178,7 @@ last unformatted node of the file. Putting the unformatted node near the direct item is potentially very bad to do. If there is no unformatted node in the file, then we return the block number of the direct item. */ /* The function is NOT SCHEDULE-SAFE! */ -inline int get_last_unformatted_node_blocknr_of_file( struct key * p_s_key_to_search, struct super_block * p_s_sb, +KSTATIC inline int get_last_unformatted_node_blocknr_of_file( struct key * p_s_key_to_search, struct super_block * p_s_sb, struct buffer_head * p_s_bh struct path * p_unf_search_path, struct inode * p_s_inode) @@ -278,7 +278,7 @@ #ifdef OLD_GET_NEW_BUFFER /* The function is NOT SCHEDULE-SAFE! */ -int get_new_buffer( +KSTATIC int get_new_buffer( struct reiserfs_transaction_handle *th, struct buffer_head * p_s_bh, struct buffer_head ** pp_s_new_bh, diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/dir.c linux-e2all/fs/reiserfs/dir.c --- linux-2.4.17-pre2/fs/reiserfs/dir.c Tue Oct 30 23:11:34 2001 +++ linux-e2all/fs/reiserfs/dir.c Sun Dec 2 12:06:40 2001 @@ -11,12 +11,12 @@ #include #include -extern struct key MIN_KEY; +KSTATIC struct key MIN_KEY; static int reiserfs_readdir (struct file *, void *, filldir_t); -int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, int datasync) ; +KSTATIC int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, int datasync) ; -struct file_operations reiserfs_dir_operations = { +KSTATIC struct file_operations reiserfs_dir_operations = { read: generic_read_dir, readdir: reiserfs_readdir, fsync: reiserfs_dir_fsync, @@ -25,7 +25,7 @@ /* * directories can handle most operations... */ -struct inode_operations reiserfs_dir_inode_operations = { +KSTATIC struct inode_operations reiserfs_dir_inode_operations = { //&reiserfs_dir_operations, /* default_file_ops */ create: reiserfs_create, lookup: reiserfs_lookup, @@ -38,7 +38,7 @@ rename: reiserfs_rename, }; -int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, int datasync) { +KSTATIC int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, int datasync) { lock_kernel(); reiserfs_commit_for_inode(dentry->d_inode) ; unlock_kernel() ; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/do_balan.c linux-e2all/fs/reiserfs/do_balan.c --- linux-2.4.17-pre2/fs/reiserfs/do_balan.c Fri Nov 9 22:18:25 2001 +++ linux-e2all/fs/reiserfs/do_balan.c Sun Dec 2 12:06:23 2001 @@ -23,14 +23,14 @@ #ifdef CONFIG_REISERFS_CHECK -struct tree_balance * cur_tb = NULL; /* detects whether more than one +KSTATIC struct tree_balance * cur_tb = NULL; /* detects whether more than one copy of tb exists as a means of checking whether schedule is interrupting do_balance */ #endif -inline void do_balance_mark_leaf_dirty (struct tree_balance * tb, +KSTATIC inline void do_balance_mark_leaf_dirty (struct tree_balance * tb, struct buffer_head * bh, int flag) { if (reiserfs_dont_log(tb->tb_sb)) { @@ -1184,7 +1184,7 @@ /* Make empty node */ -void make_empty_node (struct buffer_info * bi) +KSTATIC void make_empty_node (struct buffer_info * bi) { struct block_head * blkh; @@ -1200,7 +1200,7 @@ /* Get first empty buffer */ -struct buffer_head * get_FEB (struct tree_balance * tb) +KSTATIC struct buffer_head * get_FEB (struct tree_balance * tb) { int i; struct buffer_head * first_b; @@ -1258,7 +1258,7 @@ } } -void reiserfs_invalidate_buffer (struct tree_balance * tb, struct buffer_head * bh) +KSTATIC void reiserfs_invalidate_buffer (struct tree_balance * tb, struct buffer_head * bh) { struct block_head *blkh; blkh = B_BLK_HEAD(bh); @@ -1274,7 +1274,7 @@ } /* Replace n_dest'th key in buffer dest by n_src'th key of buffer src.*/ -void replace_key (struct tree_balance * tb, struct buffer_head * dest, int n_dest, +KSTATIC void replace_key (struct tree_balance * tb, struct buffer_head * dest, int n_dest, struct buffer_head * src, int n_src) { @@ -1300,7 +1300,7 @@ } -int get_left_neighbor_position ( +KSTATIC int get_left_neighbor_position ( struct tree_balance * tb, int h ) @@ -1318,7 +1318,7 @@ } -int get_right_neighbor_position (struct tree_balance * tb, int h) +KSTATIC int get_right_neighbor_position (struct tree_balance * tb, int h) { int Sh_position = PATH_H_POSITION (tb->tb_path, h + 1); @@ -1335,7 +1335,7 @@ #ifdef CONFIG_REISERFS_CHECK -int is_reusable (struct super_block * s, unsigned long block, int bit_value); +KSTATIC int is_reusable (struct super_block * s, unsigned long block, int bit_value); static void check_internal_node (struct super_block * s, struct buffer_head * bh, char * mes) { struct disk_child * dc; @@ -1401,7 +1401,7 @@ } -void check_after_balance_leaf (struct tree_balance * tb) +KSTATIC void check_after_balance_leaf (struct tree_balance * tb) { if (tb->lnum[0]) { if (B_FREE_SPACE (tb->L[0]) != @@ -1441,14 +1441,14 @@ } -void check_leaf_level (struct tree_balance * tb) +KSTATIC void check_leaf_level (struct tree_balance * tb) { check_leaf (tb->L[0]); check_leaf (tb->R[0]); check_leaf (PATH_PLAST_BUFFER (tb->tb_path)); } -void check_internal_levels (struct tree_balance * tb) +KSTATIC void check_internal_levels (struct tree_balance * tb) { int h; @@ -1547,7 +1547,7 @@ -void do_balance (struct tree_balance * tb, /* tree_balance structure */ +KSTATIC void do_balance (struct tree_balance * tb, /* tree_balance structure */ struct item_head * ih, /* item header of inserted item */ const char * body, /* body of inserted item or bytes to paste */ int flag) /* i - insert, d - delete diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/file.c linux-e2all/fs/reiserfs/file.c --- linux-2.4.17-pre2/fs/reiserfs/file.c Fri Oct 12 21:20:42 2001 +++ linux-e2all/fs/reiserfs/file.c Sun Dec 2 12:05:30 2001 @@ -109,7 +109,7 @@ return error ; } -struct file_operations reiserfs_file_operations = { +KSTATIC struct file_operations reiserfs_file_operations = { read: generic_file_read, write: generic_file_write, ioctl: reiserfs_ioctl, @@ -119,7 +119,7 @@ }; -struct inode_operations reiserfs_file_inode_operations = { +KSTATIC struct inode_operations reiserfs_file_inode_operations = { truncate: reiserfs_vfs_truncate_file, setattr: reiserfs_setattr, }; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/fix_node.c linux-e2all/fs/reiserfs/fix_node.c --- linux-2.4.17-pre2/fs/reiserfs/fix_node.c Fri Nov 9 22:18:25 2001 +++ linux-e2all/fs/reiserfs/fix_node.c Sun Dec 2 12:05:20 2001 @@ -533,7 +533,7 @@ #ifdef CONFIG_REISERFS_CHECK -extern struct tree_balance * cur_tb; +KSTATIC struct tree_balance * cur_tb; #endif @@ -722,7 +722,7 @@ } -void free_buffers_in_tb ( +KSTATIC void free_buffers_in_tb ( struct tree_balance * p_s_tb ) { int n_counter; @@ -1980,7 +1980,7 @@ } -void * reiserfs_kmalloc (size_t size, int flags, struct super_block * s) +KSTATIC void * reiserfs_kmalloc (size_t size, int flags, struct super_block * s) { void * vp; static size_t malloced; @@ -1998,7 +1998,7 @@ return vp; } -void reiserfs_kfree (const void * vp, size_t size, struct super_block * s) +KSTATIC void reiserfs_kfree (const void * vp, size_t size, struct super_block * s) { kfree (vp); @@ -2289,7 +2289,7 @@ */ -int fix_nodes (int n_op_mode, +KSTATIC int fix_nodes (int n_op_mode, struct tree_balance * p_s_tb, struct item_head * p_s_ins_ih, // item head of item being inserted const void * data // inserted item or data to be pasted @@ -2511,7 +2511,7 @@ /* Anatoly will probably forgive me renaming p_s_tb to tb. I just wanted to make lines shorter */ -void unfix_nodes (struct tree_balance * tb) +KSTATIC void unfix_nodes (struct tree_balance * tb) { int i; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/hashes.c linux-e2all/fs/reiserfs/hashes.c --- linux-2.4.17-pre2/fs/reiserfs/hashes.c Fri Oct 12 21:19:28 2001 +++ linux-e2all/fs/reiserfs/hashes.c Sun Dec 2 12:04:20 2001 @@ -48,7 +48,7 @@ } while(0) -u32 keyed_hash(const signed char *msg, int len) +KSTATIC u32 keyed_hash(const signed char *msg, int len) { u32 k[] = { 0x9464a485, 0x542e1a94, 0x3e846bff, 0xb75bcfc3}; @@ -174,7 +174,7 @@ /* What follows in this file is copyright 2000 by Hans Reiser, and the * licensing of what follows is governed by reiserfs/README */ -u32 yura_hash (const signed char *msg, int len) +KSTATIC u32 yura_hash (const signed char *msg, int len) { int j, pow; u32 a, c; @@ -209,7 +209,7 @@ return a; } -u32 r5_hash (const signed char *msg, int len) +KSTATIC u32 r5_hash (const signed char *msg, int len) { u32 a=0; while(*msg) { diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/ibalance.c linux-e2all/fs/reiserfs/ibalance.c --- linux-2.4.17-pre2/fs/reiserfs/ibalance.c Fri Nov 9 22:18:25 2001 +++ linux-e2all/fs/reiserfs/ibalance.c Sun Dec 2 12:04:09 2001 @@ -9,7 +9,7 @@ #include /* this is one and only function that is used outside (do_balance.c) */ -int balance_internal ( +KSTATIC int balance_internal ( struct tree_balance * , int, int, @@ -698,7 +698,7 @@ /* Replace delimiting key of buffers L[h] and S[h] by the given key.*/ -void replace_lkey ( +KSTATIC void replace_lkey ( struct tree_balance * tb, int h, struct item_head * key @@ -718,7 +718,7 @@ /* Replace delimiting key of buffers S[h] and R[h] by the given key.*/ -void replace_rkey ( +KSTATIC void replace_rkey ( struct tree_balance * tb, int h, struct item_head * key @@ -737,7 +737,7 @@ } -int balance_internal (struct tree_balance * tb, /* tree_balance structure */ +KSTATIC int balance_internal (struct tree_balance * tb, /* tree_balance structure */ int h, /* level of the tree */ int child_pos, struct item_head * insert_key, /* key for insertion on higher level */ diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/inode.c linux-e2all/fs/reiserfs/inode.c --- linux-2.4.17-pre2/fs/reiserfs/inode.c Sat Dec 1 04:16:03 2001 +++ linux-e2all/fs/reiserfs/inode.c Sun Dec 2 12:03:18 2001 @@ -21,7 +21,7 @@ // initially this function was derived from minix or ext2's analog and // evolved as the prototype did // -void reiserfs_delete_inode (struct inode * inode) +KSTATIC void reiserfs_delete_inode (struct inode * inode) { int jbegin_count = JOURNAL_PER_BALANCE_CNT * 2; int windex ; @@ -69,7 +69,7 @@ /* take base of inode_key (it comes from inode always) (dirid, objectid) and version from an inode, set offset and type of key */ -void make_cpu_key (struct cpu_key * key, const struct inode * inode, loff_t offset, +KSTATIC void make_cpu_key (struct cpu_key * key, const struct inode * inode, loff_t offset, int type, int length ) { _make_cpu_key (key, inode_items_version (inode), le32_to_cpu (INODE_PKEY (inode)->k_dir_id), @@ -81,7 +81,7 @@ // // when key is 0, do not set version and short key // -inline void make_le_item_head (struct item_head * ih, const struct cpu_key * key, +KSTATIC inline void make_le_item_head (struct item_head * ih, const struct cpu_key * key, int version, loff_t offset, int type, int length, int entry_count/*or ih_free_space*/) @@ -215,7 +215,7 @@ // files which were created in the earlier version can not be longer, // than 2 gb // -int file_capable (struct inode * inode, long block) +KSTATIC int file_capable (struct inode * inode, long block) { if (inode_items_version (inode) != ITEM_VERSION_1 || // it is new file. block < (1 << (31 - inode->i_sb->s_blocksize_bits))) // old file, but 'block' is inside of 2gb @@ -224,7 +224,7 @@ return 0; } -/*static*/ void restart_transaction(struct reiserfs_transaction_handle *th, +KSTATIC /*static*/ void restart_transaction(struct reiserfs_transaction_handle *th, struct inode *inode, struct path *path) { struct super_block *s = th->t_super ; int len = th->t_blocks_allocated ; @@ -390,7 +390,7 @@ // this is called to create file map. So, _get_block_create_0 will not // read direct item -int reiserfs_bmap (struct inode * inode, long block, +KSTATIC int reiserfs_bmap (struct inode * inode, long block, struct buffer_head * bh_result, int create) { if (!file_capable (inode, block)) @@ -511,7 +511,7 @@ // determine which parts are derivative, if any, understanding that // there are only so many ways to code to a given interface. // -int reiserfs_get_block (struct inode * inode, long block, +KSTATIC int reiserfs_get_block (struct inode * inode, long block, struct buffer_head * bh_result, int create) { int repeat, retval; @@ -1029,7 +1029,7 @@ } -void reiserfs_update_sd (struct reiserfs_transaction_handle *th, +KSTATIC void reiserfs_update_sd (struct reiserfs_transaction_handle *th, struct inode * inode) { struct cpu_key key; @@ -1086,7 +1086,7 @@ return; } -void reiserfs_read_inode(struct inode *inode) { +KSTATIC void reiserfs_read_inode(struct inode *inode) { make_bad_inode(inode) ; } @@ -1098,7 +1098,7 @@ /* looks for stat data in the tree, and fills up the fields of in-core inode stat data fields */ -void reiserfs_read_inode2 (struct inode * inode, void *p) +KSTATIC void reiserfs_read_inode2 (struct inode * inode, void *p) { INITIALIZE_PATH (path_to_sd); struct cpu_key key; @@ -1167,7 +1167,7 @@ } -struct inode * reiserfs_iget (struct super_block * s, const struct cpu_key * key) +KSTATIC struct inode * reiserfs_iget (struct super_block * s, const struct cpu_key * key) { struct inode * inode; struct reiserfs_iget4_args args ; @@ -1185,7 +1185,7 @@ return inode; } -struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, __u32 *data, +KSTATIC struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, __u32 *data, int len, int fhtype, int parent) { struct cpu_key key ; struct inode *inode = NULL ; @@ -1266,7 +1266,7 @@ } -int reiserfs_dentry_to_fh(struct dentry *dentry, __u32 *data, int *lenp, int need_parent) { +KSTATIC int reiserfs_dentry_to_fh(struct dentry *dentry, __u32 *data, int *lenp, int need_parent) { struct inode *inode = dentry->d_inode ; int maxlen = *lenp; @@ -1304,7 +1304,7 @@ ** to properly mark inodes for datasync and such, but only actually ** does something when called for a synchronous update. */ -void reiserfs_write_inode (struct inode * inode, int do_sync) { +KSTATIC void reiserfs_write_inode (struct inode * inode, int do_sync) { struct reiserfs_transaction_handle th ; int jbegin_count = 1 ; @@ -1327,7 +1327,7 @@ } } -void reiserfs_dirty_inode (struct inode * inode) { +KSTATIC void reiserfs_dirty_inode (struct inode * inode) { struct reiserfs_transaction_handle th ; if (inode->i_sb->s_flags & MS_RDONLY) { @@ -1348,7 +1348,7 @@ /* FIXME: no need any more. right? */ -int reiserfs_sync_inode (struct reiserfs_transaction_handle *th, struct inode * inode) +KSTATIC int reiserfs_sync_inode (struct reiserfs_transaction_handle *th, struct inode * inode) { int err = 0; @@ -1448,7 +1448,7 @@ reiserfs_new_directory (to insert ".", ".." item if new object is directory) or reiserfs_new_symlink (to insert symlink body if new object is symlink) or nothing (if new object is regular file) */ -struct inode * reiserfs_new_inode (struct reiserfs_transaction_handle *th, +KSTATIC struct inode * reiserfs_new_inode (struct reiserfs_transaction_handle *th, const struct inode * dir, int mode, const char * symname, int i_size, /* 0 for regular, EMTRY_DIR_SIZE for dirs, @@ -1683,7 +1683,7 @@ ** ** some code taken from block_truncate_page */ -void reiserfs_truncate_file(struct inode *p_s_inode, int update_timestamps) { +KSTATIC void reiserfs_truncate_file(struct inode *p_s_inode, int update_timestamps) { struct reiserfs_transaction_handle th ; int windex ; @@ -1975,7 +1975,7 @@ // // from ext2_prepare_write, but modified // -int reiserfs_prepare_write(struct file *f, struct page *page, +KSTATIC int reiserfs_prepare_write(struct file *f, struct page *page, unsigned from, unsigned to) { struct inode *inode = page->mapping->host ; reiserfs_wait_on_write_block(inode->i_sb) ; @@ -2027,7 +2027,7 @@ return ret ; } -struct address_space_operations reiserfs_address_space_operations = { +KSTATIC struct address_space_operations reiserfs_address_space_operations = { writepage: reiserfs_writepage, readpage: reiserfs_readpage, sync_page: block_sync_page, diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/ioctl.c linux-e2all/fs/reiserfs/ioctl.c --- linux-2.4.17-pre2/fs/reiserfs/ioctl.c Sat Sep 8 19:05:32 2001 +++ linux-e2all/fs/reiserfs/ioctl.c Sun Dec 2 12:01:58 2001 @@ -16,7 +16,7 @@ ** and prevent packing file (argument arg has to be non-zero) ** 2) That's all for a while ... */ -int reiserfs_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, +KSTATIC int reiserfs_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, unsigned long arg) { switch (cmd) { @@ -34,7 +34,7 @@ ** Function try to convert tail from direct item into indirect. ** It set up nopack attribute in the inode.u.reiserfs_i.nopack */ -int reiserfs_unpack (struct inode * inode, struct file * filp) +KSTATIC int reiserfs_unpack (struct inode * inode, struct file * filp) { int retval = 0; int index ; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/item_ops.c linux-e2all/fs/reiserfs/item_ops.c --- linux-2.4.17-pre2/fs/reiserfs/item_ops.c Fri Oct 12 21:19:28 2001 +++ linux-e2all/fs/reiserfs/item_ops.c Sun Dec 2 12:01:50 2001 @@ -110,7 +110,7 @@ vi->vi_index, vi->vi_type, vi->vi_ih); } -struct item_operations stat_data_ops = { +KSTATIC struct item_operations stat_data_ops = { sd_bytes_number, sd_decrement_key, sd_is_left_mergeable, @@ -213,7 +213,7 @@ vi->vi_index, vi->vi_type, vi->vi_ih); } -struct item_operations direct_ops = { +KSTATIC struct item_operations direct_ops = { direct_bytes_number, direct_decrement_key, direct_is_left_mergeable, @@ -367,7 +367,7 @@ vi->vi_index, vi->vi_type, vi->vi_ih); } -struct item_operations indirect_ops = { +KSTATIC struct item_operations indirect_ops = { indirect_bytes_number, indirect_decrement_key, indirect_is_left_mergeable, @@ -668,7 +668,7 @@ printk ("\n"); } -struct item_operations direntry_ops = { +KSTATIC struct item_operations direntry_ops = { direntry_bytes_number, direntry_decrement_key, direntry_is_left_mergeable, @@ -691,7 +691,7 @@ do not compile #endif -struct item_operations * item_ops [4] = { +KSTATIC struct item_operations * item_ops [4] = { &stat_data_ops, &indirect_ops, &direct_ops, diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/journal.c linux-e2all/fs/reiserfs/journal.c --- linux-2.4.17-pre2/fs/reiserfs/journal.c Sat Dec 1 04:16:03 2001 +++ linux-e2all/fs/reiserfs/journal.c Sun Dec 2 12:19:53 2001 @@ -65,11 +65,11 @@ static int reiserfs_mounted_fs_count = 0 ; /* wake this up when you add something to the commit thread task queue */ -DECLARE_WAIT_QUEUE_HEAD(reiserfs_commit_thread_wait) ; +KSTATIC DECLARE_WAIT_QUEUE_HEAD(reiserfs_commit_thread_wait) ; /* wait on this if you need to be sure you task queue entries have been run */ static DECLARE_WAIT_QUEUE_HEAD(reiserfs_commit_thread_done) ; -DECLARE_TASK_QUEUE(reiserfs_commit_thread_tq) ; +KSTATIC DECLARE_TASK_QUEUE(reiserfs_commit_thread_tq) ; #define JOURNAL_TRANS_HALF 1018 /* must be correct to keep the desc and commit structs at 4k */ @@ -239,7 +239,7 @@ ** get memory for JOURNAL_NUM_BITMAPS worth of bitmaps. ** jb_array is the array to be filled in. */ -int reiserfs_allocate_list_bitmaps(struct super_block *p_s_sb, +KSTATIC int reiserfs_allocate_list_bitmaps(struct super_block *p_s_sb, struct reiserfs_list_bitmap *jb_array, int bmap_nr) { int i ; @@ -369,7 +369,7 @@ } /* buffer is in current transaction */ -inline int buffer_journaled(const struct buffer_head *bh) { +KSTATIC inline int buffer_journaled(const struct buffer_head *bh) { if (bh) return test_bit(BH_JDirty, ( struct buffer_head * ) &bh->b_state) ; else @@ -379,21 +379,21 @@ /* disk block was taken off free list before being in a finished transation, or written to disk ** journal_new blocks can be reused immediately, for any purpose */ -inline int buffer_journal_new(const struct buffer_head *bh) { +KSTATIC inline int buffer_journal_new(const struct buffer_head *bh) { if (bh) return test_bit(BH_JNew, ( struct buffer_head * )&bh->b_state) ; else return 0 ; } -inline int mark_buffer_journal_new(struct buffer_head *bh) { +KSTATIC inline int mark_buffer_journal_new(struct buffer_head *bh) { if (bh) { set_bit(BH_JNew, &bh->b_state) ; } return 0 ; } -inline int mark_buffer_not_journaled(struct buffer_head *bh) { +KSTATIC inline int mark_buffer_not_journaled(struct buffer_head *bh) { if (bh) clear_bit(BH_JDirty, &bh->b_state) ; return 0 ; @@ -402,7 +402,7 @@ /* utility function to force a BUG if it is called without the big ** kernel lock held. caller is the string printed just before calling BUG() */ -void reiserfs_check_lock_depth(char *caller) { +KSTATIC void reiserfs_check_lock_depth(char *caller) { #ifdef CONFIG_SMP if (current->lock_depth < 0) { printk("%s called without kernel lock held\n", caller) ; @@ -466,7 +466,7 @@ return 0 ; #endif } -int pop_journal_writer(int index) { +KSTATIC int pop_journal_writer(int index) { #ifdef CONFIG_REISERFS_CHECK if (index >= 0) { journal_writers[index] = NULL ; @@ -475,7 +475,7 @@ return 0 ; } -int dump_journal_writers(void) { +KSTATIC int dump_journal_writers(void) { int i ; for (i = 0 ; i < 512 ; i++) { if (journal_writers[i]) { @@ -503,7 +503,7 @@ ** reject it on the next call to reiserfs_in_journal ** */ -int reiserfs_in_journal(struct super_block *p_s_sb, kdev_t dev, +KSTATIC int reiserfs_in_journal(struct super_block *p_s_sb, kdev_t dev, unsigned long bl, int size, int search_all, unsigned long *next_zero_bit) { struct reiserfs_journal_cnode *cn ; @@ -557,7 +557,7 @@ /* insert cn into table */ -inline void insert_journal_hash(struct reiserfs_journal_cnode **table, struct reiserfs_journal_cnode *cn) { +KSTATIC inline void insert_journal_hash(struct reiserfs_journal_cnode **table, struct reiserfs_journal_cnode *cn) { struct reiserfs_journal_cnode *cn_orig ; cn_orig = journal_hash(table, cn->dev, cn->blocknr) ; @@ -1268,7 +1268,7 @@ ** removes any nodes in table with name block and dev as bh. ** only touchs the hnext and hprev pointers. */ -void remove_journal_hash(struct reiserfs_journal_cnode **table, struct reiserfs_journal_list *jl,struct buffer_head *bh, +KSTATIC void remove_journal_hash(struct reiserfs_journal_cnode **table, struct reiserfs_journal_list *jl,struct buffer_head *bh, int remove_freed){ struct reiserfs_journal_cnode *cur ; struct reiserfs_journal_cnode **head ; @@ -1349,13 +1349,13 @@ /* ** call on unmount. flush all journal trans, release all alloc'd ram */ -int journal_release(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb) { +KSTATIC int journal_release(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb) { return do_journal_release(th, p_s_sb, 0) ; } /* ** only call from an error condition inside reiserfs_read_super! */ -int journal_release_error(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb) { +KSTATIC int journal_release_error(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb) { return do_journal_release(th, p_s_sb, 1) ; } @@ -1865,7 +1865,7 @@ /* ** must be called once on fs mount. calls journal_read for you */ -int journal_init(struct super_block *p_s_sb) { +KSTATIC int journal_init(struct super_block *p_s_sb) { int num_cnodes = JOURNAL_BLOCK_COUNT * 2 ; if (sizeof(struct reiserfs_journal_commit) != 4096 || @@ -1958,7 +1958,7 @@ ** be used by delete to make sure they don't write more than can fit inside a single ** transaction */ -int journal_transaction_should_end(struct reiserfs_transaction_handle *th, int new_alloc) { +KSTATIC int journal_transaction_should_end(struct reiserfs_transaction_handle *th, int new_alloc) { time_t now = CURRENT_TIME ; if (reiserfs_dont_log(th->t_super)) return 0 ; @@ -1975,7 +1975,7 @@ /* this must be called inside a transaction, and requires the ** kernel_lock to be held */ -void reiserfs_block_writes(struct reiserfs_transaction_handle *th) { +KSTATIC void reiserfs_block_writes(struct reiserfs_transaction_handle *th) { struct super_block *s = th->t_super ; SB_JOURNAL(s)->j_must_wait = 1 ; set_bit(WRITERS_BLOCKED, &SB_JOURNAL(s)->j_state) ; @@ -1985,7 +1985,7 @@ /* this must be called without a transaction started, and does not ** require BKL */ -void reiserfs_allow_writes(struct super_block *s) { +KSTATIC void reiserfs_allow_writes(struct super_block *s) { clear_bit(WRITERS_BLOCKED, &SB_JOURNAL(s)->j_state) ; wake_up(&SB_JOURNAL(s)->j_join_wait) ; } @@ -1993,7 +1993,7 @@ /* this must be called without a transaction started, and does not ** require BKL */ -void reiserfs_wait_on_write_block(struct super_block *s) { +KSTATIC void reiserfs_wait_on_write_block(struct super_block *s) { wait_event(SB_JOURNAL(s)->j_join_wait, !test_bit(WRITERS_BLOCKED, &SB_JOURNAL(s)->j_state)) ; } @@ -2083,16 +2083,16 @@ } -int journal_join(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, unsigned long nblocks) { +KSTATIC int journal_join(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, unsigned long nblocks) { return do_journal_begin_r(th, p_s_sb, nblocks, 1) ; } -int journal_begin(struct reiserfs_transaction_handle *th, struct super_block * p_s_sb, unsigned long nblocks) { +KSTATIC int journal_begin(struct reiserfs_transaction_handle *th, struct super_block * p_s_sb, unsigned long nblocks) { return do_journal_begin_r(th, p_s_sb, nblocks, 0) ; } /* not used at all */ -int journal_prepare(struct super_block * p_s_sb, struct buffer_head *bh) { +KSTATIC int journal_prepare(struct super_block * p_s_sb, struct buffer_head *bh) { return 0 ; } @@ -2105,7 +2105,7 @@ ** ** if j_len, is bigger than j_len_alloc, it pushes j_len_alloc to 10 + j_len. */ -int journal_mark_dirty(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, struct buffer_head *bh) { +KSTATIC int journal_mark_dirty(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, struct buffer_head *bh) { struct reiserfs_journal_cnode *cn = NULL; int count_already_incd = 0 ; int prepared = 0 ; @@ -2215,7 +2215,7 @@ ** otherwise, just mark it dirty and move on. Used for writes to meta blocks ** that don't need journaling */ -int journal_mark_dirty_nolog(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, struct buffer_head *bh) { +KSTATIC int journal_mark_dirty_nolog(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, struct buffer_head *bh) { if (reiserfs_dont_log(th->t_super) || buffer_journaled(bh) || buffer_journal_dirty(bh)) { return journal_mark_dirty(th, p_s_sb, bh) ; @@ -2227,7 +2227,7 @@ return 0 ; } -int journal_end(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, unsigned long nblocks) { +KSTATIC int journal_end(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, unsigned long nblocks) { return do_journal_end(th, p_s_sb, nblocks, 0) ; } @@ -2238,7 +2238,7 @@ ** ** returns 1 if it cleaned and relsed the buffer. 0 otherwise */ -int remove_from_transaction(struct super_block *p_s_sb, unsigned long blocknr, int already_cleaned) { +KSTATIC int remove_from_transaction(struct super_block *p_s_sb, unsigned long blocknr, int already_cleaned) { struct buffer_head *bh ; struct reiserfs_journal_cnode *cn ; int ret = 0; @@ -2279,7 +2279,7 @@ } /* removes from a specific journal list hash */ -int remove_from_journal_list(struct super_block *s, struct reiserfs_journal_list *jl, struct buffer_head *bh, int remove_freed) { +KSTATIC int remove_from_journal_list(struct super_block *s, struct reiserfs_journal_list *jl, struct buffer_head *bh, int remove_freed) { remove_journal_hash(SB_JOURNAL(s)->j_list_hash_table, jl, bh, remove_freed) ; return 0 ; } @@ -2329,7 +2329,7 @@ /* syncs the commit blocks, but does not force the real buffers to disk ** will wait until the current transaction is done/commited before returning */ -int journal_end_sync(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, unsigned long nblocks) { +KSTATIC int journal_end_sync(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, unsigned long nblocks) { if (SB_JOURNAL(p_s_sb)->j_len == 0) { reiserfs_prepare_for_journal(p_s_sb, SB_BUFFER_WITH_SB(p_s_sb), 1) ; @@ -2338,7 +2338,7 @@ return do_journal_end(th, p_s_sb, nblocks, COMMIT_NOW | WAIT) ; } -int show_reiserfs_locks(void) { +KSTATIC int show_reiserfs_locks(void) { dump_journal_writers() ; #if 0 /* debugging code for when we are compiled static don't delete */ @@ -2368,7 +2368,7 @@ ** change flush_commit_lists to have a repeat parameter too. ** */ -void flush_async_commits(struct super_block *p_s_sb) { +KSTATIC void flush_async_commits(struct super_block *p_s_sb) { int i ; for (i = 0 ; i < JOURNAL_LIST_COUNT ; i++) { @@ -2387,7 +2387,7 @@ ** ** called by sync_dev_journal from buffer.c */ -int flush_old_commits(struct super_block *p_s_sb, int immediate) { +KSTATIC int flush_old_commits(struct super_block *p_s_sb, int immediate) { int i ; int count = 0; int start ; @@ -2546,7 +2546,7 @@ ** ** Then remove it from the current transaction, decrementing any counters and filing it on the clean list. */ -int journal_mark_freed(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, unsigned long blocknr) { +KSTATIC int journal_mark_freed(struct reiserfs_transaction_handle *th, struct super_block *p_s_sb, unsigned long blocknr) { struct reiserfs_journal_cnode *cn = NULL ; struct buffer_head *bh = NULL ; struct reiserfs_list_bitmap *jb = NULL ; @@ -2619,7 +2619,7 @@ return 0 ; } -void reiserfs_update_inode_transaction(struct inode *inode) { +KSTATIC void reiserfs_update_inode_transaction(struct inode *inode) { inode->u.reiserfs_i.i_trans_index = SB_JOURNAL_LIST_INDEX(inode->i_sb); @@ -2634,7 +2634,7 @@ return 0 ; } -void reiserfs_commit_for_inode(struct inode *inode) { +KSTATIC void reiserfs_commit_for_inode(struct inode *inode) { struct reiserfs_journal_list *jl ; struct reiserfs_transaction_handle th ; struct super_block *sb = inode->i_sb ; @@ -2654,7 +2654,7 @@ */ } -void reiserfs_restore_prepared_buffer(struct super_block *p_s_sb, +KSTATIC void reiserfs_restore_prepared_buffer(struct super_block *p_s_sb, struct buffer_head *bh) { PROC_INFO_INC( p_s_sb, journal.restore_prepared ); if (reiserfs_dont_log (p_s_sb)) @@ -2666,7 +2666,7 @@ clear_bit(BH_JPrepared, &bh->b_state) ; } -extern struct tree_balance *cur_tb ; +KSTATIC struct tree_balance *cur_tb ; /* ** before we can change a metadata block, we have to make sure it won't ** be written to disk while we are altering it. So, we must: @@ -2674,7 +2674,7 @@ ** wait on it. ** */ -void reiserfs_prepare_for_journal(struct super_block *p_s_sb, +KSTATIC void reiserfs_prepare_for_journal(struct super_block *p_s_sb, struct buffer_head *bh, int wait) { int retry_count = 0 ; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/lbalance.c linux-e2all/fs/reiserfs/lbalance.c --- linux-2.4.17-pre2/fs/reiserfs/lbalance.c Tue Oct 30 23:11:34 2001 +++ linux-e2all/fs/reiserfs/lbalance.c Sun Dec 2 11:58:16 2001 @@ -569,7 +569,7 @@ /* copy mov_num items and mov_bytes of the (mov_num-1)th item to neighbor. Delete them from source */ -int leaf_move_items (int shift_mode, struct tree_balance * tb, int mov_num, int mov_bytes, struct buffer_head * Snew) +KSTATIC int leaf_move_items (int shift_mode, struct tree_balance * tb, int mov_num, int mov_bytes, struct buffer_head * Snew) { int ret_value; struct buffer_info dest_bi, src_bi; @@ -588,7 +588,7 @@ /* Shift shift_num items (and shift_bytes of last shifted item if shift_bytes != -1) from S[0] to L[0] and replace the delimiting key */ -int leaf_shift_left (struct tree_balance * tb, int shift_num, int shift_bytes) +KSTATIC int leaf_shift_left (struct tree_balance * tb, int shift_num, int shift_bytes) { struct buffer_head * S0 = PATH_PLAST_BUFFER (tb->tb_path); int i; @@ -637,7 +637,7 @@ /* Shift shift_num (shift_bytes) items from S[0] to the right neighbor, and replace the delimiting key */ -int leaf_shift_right( +KSTATIC int leaf_shift_right( struct tree_balance * tb, int shift_num, int shift_bytes @@ -669,7 +669,7 @@ If last_first == 1. Starting from position 'first+1' delete del_num-1 items in whole. Delete part of body of the last item . Part defined by del_bytes. Don't delete last item header. */ -void leaf_delete_items (struct buffer_info * cur_bi, int last_first, +KSTATIC void leaf_delete_items (struct buffer_info * cur_bi, int last_first, int first, int del_num, int del_bytes) { struct buffer_head * bh; @@ -727,7 +727,7 @@ /* insert item into the leaf node in position before */ -void leaf_insert_into_buf (struct buffer_info * bi, int before, +KSTATIC void leaf_insert_into_buf (struct buffer_info * bi, int before, struct item_head * inserted_item_ih, const char * inserted_item_body, int zeros_number) @@ -803,7 +803,7 @@ /* paste paste_size bytes to affected_item_num-th item. When item is a directory, this only prepare space for new entries */ -void leaf_paste_in_buffer (struct buffer_info * bi, int affected_item_num, +KSTATIC void leaf_paste_in_buffer (struct buffer_info * bi, int affected_item_num, int pos_in_item, int paste_size, const char * body, int zeros_number) @@ -958,7 +958,7 @@ pos_in_item - number of first deleted entry cut_size - count of deleted entries */ -void leaf_cut_from_buffer (struct buffer_info * bi, int cut_item_num, +KSTATIC void leaf_cut_from_buffer (struct buffer_info * bi, int cut_item_num, int pos_in_item, int cut_size) { int nr; @@ -1117,7 +1117,7 @@ /* paste new_entry_count entries (new_dehs, records) into position before to item_num-th item */ -void leaf_paste_entries ( +KSTATIC void leaf_paste_entries ( struct buffer_head * bh, int item_num, int before, diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/namei.c linux-e2all/fs/reiserfs/namei.c --- linux-2.4.17-pre2/fs/reiserfs/namei.c Fri Nov 9 22:18:25 2001 +++ linux-e2all/fs/reiserfs/namei.c Sun Dec 2 11:57:22 2001 @@ -72,7 +72,7 @@ // de_bh, de_ih, de_deh (points to first element of array), de_item_num is set -inline void set_de_name_and_namelen (struct reiserfs_dir_entry * de) +KSTATIC inline void set_de_name_and_namelen (struct reiserfs_dir_entry * de) { struct reiserfs_de_head * deh = de->de_deh + de->de_entry_num; @@ -125,7 +125,7 @@ */ /* The function is NOT SCHEDULE-SAFE! */ -int search_by_entry_key (struct super_block * sb, const struct cpu_key * key, +KSTATIC int search_by_entry_key (struct super_block * sb, const struct cpu_key * key, struct path * path, struct reiserfs_dir_entry * de) { int retval; @@ -347,7 +347,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -struct dentry * reiserfs_lookup (struct inode * dir, struct dentry * dentry) +KSTATIC struct dentry * reiserfs_lookup (struct inode * dir, struct dentry * dentry) { int retval; struct inode * inode = 0; @@ -518,7 +518,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -int reiserfs_create (struct inode * dir, struct dentry *dentry, int mode) +KSTATIC int reiserfs_create (struct inode * dir, struct dentry *dentry, int mode) { int retval; struct inode * inode; @@ -574,7 +574,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -int reiserfs_mknod (struct inode * dir, struct dentry *dentry, int mode, int rdev) +KSTATIC int reiserfs_mknod (struct inode * dir, struct dentry *dentry, int mode, int rdev) { int retval; struct inode * inode; @@ -629,7 +629,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -int reiserfs_mkdir (struct inode * dir, struct dentry *dentry, int mode) +KSTATIC int reiserfs_mkdir (struct inode * dir, struct dentry *dentry, int mode) { int retval; struct inode * inode; @@ -708,7 +708,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -int reiserfs_rmdir (struct inode * dir, struct dentry *dentry) +KSTATIC int reiserfs_rmdir (struct inode * dir, struct dentry *dentry) { int retval; struct inode * inode; @@ -785,7 +785,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -int reiserfs_unlink (struct inode * dir, struct dentry *dentry) +KSTATIC int reiserfs_unlink (struct inode * dir, struct dentry *dentry) { int retval; struct inode * inode; @@ -855,7 +855,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -int reiserfs_symlink (struct inode * dir, struct dentry * dentry, const char * symname) +KSTATIC int reiserfs_symlink (struct inode * dir, struct dentry * dentry, const char * symname) { int retval; struct inode * inode; @@ -932,7 +932,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -int reiserfs_link (struct dentry * old_dentry, struct inode * dir, struct dentry * dentry) +KSTATIC int reiserfs_link (struct dentry * old_dentry, struct inode * dir, struct dentry * dentry) { int retval; struct inode *inode = old_dentry->d_inode; @@ -1032,7 +1032,7 @@ * one path. If it holds 2 or more, it can get into endless waiting in * get_empty_nodes or its clones */ -int reiserfs_rename (struct inode * old_dir, struct dentry *old_dentry, +KSTATIC int reiserfs_rename (struct inode * old_dir, struct dentry *old_dentry, struct inode * new_dir, struct dentry *new_dentry) { int retval; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/objectid.c linux-e2all/fs/reiserfs/objectid.c --- linux-2.4.17-pre2/fs/reiserfs/objectid.c Fri Nov 9 22:18:25 2001 +++ linux-e2all/fs/reiserfs/objectid.c Sun Dec 2 11:56:02 2001 @@ -48,7 +48,7 @@ /* get unique object identifier */ -__u32 reiserfs_get_unused_objectid (struct reiserfs_transaction_handle *th) +KSTATIC __u32 reiserfs_get_unused_objectid (struct reiserfs_transaction_handle *th) { struct super_block * s = th->t_super; struct reiserfs_super_block * rs = SB_DISK_SUPER_BLOCK (s); @@ -92,7 +92,7 @@ /* makes object identifier unused */ -void reiserfs_release_objectid (struct reiserfs_transaction_handle *th, +KSTATIC void reiserfs_release_objectid (struct reiserfs_transaction_handle *th, __u32 objectid_to_release) { struct super_block * s = th->t_super; @@ -167,7 +167,7 @@ } -int reiserfs_convert_objectid_map_v1(struct super_block *s) { +KSTATIC int reiserfs_convert_objectid_map_v1(struct super_block *s) { struct reiserfs_super_block *disk_sb = SB_DISK_SUPER_BLOCK (s); int cur_size = le16_to_cpu(disk_sb->s_oid_cursize) ; int new_size = (s->s_blocksize - SB_SIZE) / sizeof(__u32) / 2 * 2 ; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/prints.c linux-e2all/fs/reiserfs/prints.c --- linux-2.4.17-pre2/fs/reiserfs/prints.c Fri Nov 9 22:18:25 2001 +++ linux-e2all/fs/reiserfs/prints.c Sun Dec 2 11:56:39 2001 @@ -259,14 +259,14 @@ va_end( args );\ } -void reiserfs_warning (const char * fmt, ...) +KSTATIC void reiserfs_warning (const char * fmt, ...) { do_reiserfs_warning(fmt); /* console_print (error_buf); */ printk (KERN_WARNING "%s", error_buf); } -void reiserfs_debug (struct super_block *s, int level, const char * fmt, ...) +KSTATIC void reiserfs_debug (struct super_block *s, int level, const char * fmt, ...) { #ifdef CONFIG_REISERFS_CHECK do_reiserfs_warning(fmt); @@ -326,7 +326,7 @@ extern struct tree_balance * cur_tb; #endif -void reiserfs_panic (struct super_block * sb, const char * fmt, ...) +KSTATIC void reiserfs_panic (struct super_block * sb, const char * fmt, ...) { show_reiserfs_locks() ; do_reiserfs_warning(fmt); @@ -339,7 +339,7 @@ } -void print_virtual_node (struct virtual_node * vn) +KSTATIC void print_virtual_node (struct virtual_node * vn) { int i; struct virtual_item * vi; @@ -357,7 +357,7 @@ } -void print_path (struct tree_balance * tb, struct path * path) +KSTATIC void print_path (struct tree_balance * tb, struct path * path) { int h = 0; struct buffer_head * bh; @@ -542,7 +542,7 @@ } -void print_block (struct buffer_head * bh, ...)//int print_mode, int first, int last) +KSTATIC void print_block (struct buffer_head * bh, ...)//int print_mode, int first, int last) { va_list args; int mode, first, last; @@ -569,7 +569,7 @@ char print_tb_buf[2048]; /* this stores initial state of tree balance in the print_tb_buf */ -void store_print_tb (struct tree_balance * tb) +KSTATIC void store_print_tb (struct tree_balance * tb) { int h = 0; int i; @@ -643,7 +643,7 @@ "======================== the end ====================================\n"); } -void print_cur_tb (char * mes) +KSTATIC void print_cur_tb (char * mes) { printk ("%s\n%s", mes, print_tb_buf); } @@ -681,7 +681,7 @@ } -void check_leaf (struct buffer_head * bh) +KSTATIC void check_leaf (struct buffer_head * bh) { int i; struct item_head * ih; @@ -694,7 +694,7 @@ } -void check_internal (struct buffer_head * bh) +KSTATIC void check_internal (struct buffer_head * bh) { if (!bh) return; @@ -702,7 +702,7 @@ } -void print_statistics (struct super_block * s) +KSTATIC void print_statistics (struct super_block * s) { /* diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/procfs.c linux-e2all/fs/reiserfs/procfs.c --- linux-2.4.17-pre2/fs/reiserfs/procfs.c Fri Nov 9 22:18:25 2001 +++ linux-e2all/fs/reiserfs/procfs.c Sun Dec 2 11:55:50 2001 @@ -48,13 +48,13 @@ return result; } -int procinfo_epilogue( struct super_block *super ) +KSTATIC int procinfo_epilogue( struct super_block *super ) { drop_super( super ); return 0; } -int reiserfs_proc_tail( int len, char *buffer, char **start, +KSTATIC int reiserfs_proc_tail( int len, char *buffer, char **start, off_t offset, int count, int *eof ) { /* this is black procfs magic */ @@ -71,7 +71,7 @@ return len; } -int reiserfs_version_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_version_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { int len = 0; @@ -92,7 +92,7 @@ return reiserfs_proc_tail( len, buffer, start, offset, count, eof ); } -int reiserfs_global_version_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_global_version_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { int len = 0; @@ -127,7 +127,7 @@ #define DJF( x ) le32_to_cpu( rs -> x ) #define JF( x ) ( r -> s_journal -> x ) -int reiserfs_super_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_super_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { struct super_block *sb; @@ -206,7 +206,7 @@ return reiserfs_proc_tail( len, buffer, start, offset, count, eof ); } -int reiserfs_per_level_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_per_level_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { struct super_block *sb; @@ -286,7 +286,7 @@ return reiserfs_proc_tail( len, buffer, start, offset, count, eof ); } -int reiserfs_bitmap_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_bitmap_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { struct super_block *sb; @@ -325,7 +325,7 @@ return reiserfs_proc_tail( len, buffer, start, offset, count, eof ); } -int reiserfs_on_disk_super_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_on_disk_super_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { struct super_block *sb; @@ -375,7 +375,7 @@ return reiserfs_proc_tail( len, buffer, start, offset, count, eof ); } -int reiserfs_oidmap_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_oidmap_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { struct super_block *sb; @@ -430,7 +430,7 @@ return reiserfs_proc_tail( len, buffer, start, offset, count, eof ); } -int reiserfs_journal_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_journal_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { struct super_block *sb; @@ -543,7 +543,7 @@ static struct proc_dir_entry *proc_info_root = NULL; static const char *proc_info_root_name = "fs/reiserfs"; -int reiserfs_proc_info_init( struct super_block *sb ) +KSTATIC int reiserfs_proc_info_init( struct super_block *sb ) { spin_lock_init( & __PINFO( sb ).lock ); sb->u.reiserfs_sb.procdir = proc_mkdir( bdevname( sb -> s_dev ), @@ -558,7 +558,7 @@ } -int reiserfs_proc_info_done( struct super_block *sb ) +KSTATIC int reiserfs_proc_info_done( struct super_block *sb ) { spin_lock( & __PINFO( sb ).lock ); __PINFO( sb ).exiting = 1; @@ -574,7 +574,7 @@ to it. Other parts of reiserfs use this function to make their per-device statistics available via /proc */ -struct proc_dir_entry *reiserfs_proc_register( struct super_block *sb, +KSTATIC struct proc_dir_entry *reiserfs_proc_register( struct super_block *sb, char *name, read_proc_t *func ) { return ( sb->u.reiserfs_sb.procdir ) ? create_proc_read_entry @@ -582,12 +582,12 @@ ( void * ) ( int ) sb -> s_dev ) : NULL; } -void reiserfs_proc_unregister( struct super_block *sb, const char *name ) +KSTATIC void reiserfs_proc_unregister( struct super_block *sb, const char *name ) { remove_proc_entry( name, sb->u.reiserfs_sb.procdir ); } -struct proc_dir_entry *reiserfs_proc_register_global( char *name, +KSTATIC struct proc_dir_entry *reiserfs_proc_register_global( char *name, read_proc_t *func ) { return ( proc_info_root ) ? create_proc_read_entry( name, 0, @@ -595,12 +595,12 @@ func, NULL ) : NULL; } -void reiserfs_proc_unregister_global( const char *name ) +KSTATIC void reiserfs_proc_unregister_global( const char *name ) { remove_proc_entry( name, proc_info_root ); } -int reiserfs_proc_info_global_init( void ) +KSTATIC int reiserfs_proc_info_global_init( void ) { if( proc_info_root == NULL ) { proc_info_root = proc_mkdir( proc_info_root_name, 0 ); @@ -615,7 +615,7 @@ return 0; } -int reiserfs_proc_info_global_done( void ) +KSTATIC int reiserfs_proc_info_global_done( void ) { if ( proc_info_root != NULL ) { proc_info_root = NULL; @@ -627,56 +627,56 @@ /* REISERFS_PROC_INFO */ #else -int reiserfs_proc_info_init( struct super_block *sb ) { return 0; } -int reiserfs_proc_info_done( struct super_block *sb ) { return 0; } +KSTATIC int reiserfs_proc_info_init( struct super_block *sb ) { return 0; } +KSTATIC int reiserfs_proc_info_done( struct super_block *sb ) { return 0; } -struct proc_dir_entry *reiserfs_proc_register( struct super_block *sb, +KSTATIC struct proc_dir_entry *reiserfs_proc_register( struct super_block *sb, char *name, read_proc_t *func ) { return NULL; } -void reiserfs_proc_unregister( struct super_block *sb, const char *name ) +KSTATIC void reiserfs_proc_unregister( struct super_block *sb, const char *name ) {;} -struct proc_dir_entry *reiserfs_proc_register_global( char *name, +KSTATIC struct proc_dir_entry *reiserfs_proc_register_global( char *name, read_proc_t *func ) { return NULL; } -void reiserfs_proc_unregister_global( const char *name ) {;} +KSTATIC void reiserfs_proc_unregister_global( const char *name ) {;} -int reiserfs_proc_info_global_init( void ) { return 0; } -int reiserfs_proc_info_global_done( void ) { return 0; } +KSTATIC int reiserfs_proc_info_global_init( void ) { return 0; } +KSTATIC int reiserfs_proc_info_global_done( void ) { return 0; } -int reiserfs_global_version_in_proc( char *buffer, char **start, +KSTATIC int reiserfs_global_version_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { return 0; } -int reiserfs_version_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_version_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { return 0; } -int reiserfs_super_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_super_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { return 0; } -int reiserfs_per_level_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_per_level_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { return 0; } -int reiserfs_bitmap_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_bitmap_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { return 0; } -int reiserfs_on_disk_super_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_on_disk_super_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { return 0; } -int reiserfs_oidmap_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_oidmap_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { return 0; } -int reiserfs_journal_in_proc( char *buffer, char **start, off_t offset, +KSTATIC int reiserfs_journal_in_proc( char *buffer, char **start, off_t offset, int count, int *eof, void *data ) { return 0; } diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/reiserfs_all.c linux-e2all/fs/reiserfs/reiserfs_all.c --- linux-2.4.17-pre2/fs/reiserfs/reiserfs_all.c Thu Jan 1 00:00:00 1970 +++ linux-e2all/fs/reiserfs/reiserfs_all.c Sun Dec 2 12:27:41 2001 @@ -0,0 +1,23 @@ +#include +#include "bitmap.c" +#include "buffer2.c" +#include "dir.c" +#include "do_balan.c" +#include "file.c" +#include "fix_node.c" +#include "hashes.c" +#include "ibalance.c" +#include "inode.c" +#include "ioctl.c" +#include "item_ops.c" +#include "journal.c" +#include "lbalance.c" +#include "namei.c" +#include "objectid.c" +#include "prints.c" +#include "procfs.c" +#include "resize.c" +#include "stree.c" +#include "super.c" +#include "tail_conversion.c" +#include "version.c" diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/resize.c linux-e2all/fs/reiserfs/resize.c --- linux-2.4.17-pre2/fs/reiserfs/resize.c Sat Sep 8 19:05:32 2001 +++ linux-e2all/fs/reiserfs/resize.c Sun Dec 2 11:54:53 2001 @@ -16,7 +16,7 @@ #include #include -int reiserfs_resize (struct super_block * s, unsigned long block_count_new) +KSTATIC int reiserfs_resize (struct super_block * s, unsigned long block_count_new) { struct reiserfs_super_block * sb; struct buffer_head ** bitmap, * bh; diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/stree.c linux-e2all/fs/reiserfs/stree.c --- linux-2.4.17-pre2/fs/reiserfs/stree.c Sat Dec 1 04:16:03 2001 +++ linux-e2all/fs/reiserfs/stree.c Sun Dec 2 11:54:47 2001 @@ -62,7 +62,7 @@ #include /* Does the buffer contain a disk block which is in the tree. */ -inline int B_IS_IN_TREE (const struct buffer_head * p_s_bh) +KSTATIC inline int B_IS_IN_TREE (const struct buffer_head * p_s_bh) { RFALSE( B_LEVEL (p_s_bh) > MAX_HEIGHT, @@ -74,7 +74,7 @@ -inline void copy_short_key (void * to, const void * from) +KSTATIC inline void copy_short_key (void * to, const void * from) { memcpy (to, from, SHORT_KEY_SIZE); } @@ -82,7 +82,7 @@ // // to gets item head in le form // -inline void copy_item_head(struct item_head * p_v_to, +KSTATIC inline void copy_item_head(struct item_head * p_v_to, const struct item_head * p_v_from) { memcpy (p_v_to, p_v_from, IH_SIZE); @@ -95,7 +95,7 @@ Returns: -1 if key1 < key2 0 if key1 == key2 1 if key1 > key2 */ -inline int comp_short_keys (const struct key * le_key, +KSTATIC inline int comp_short_keys (const struct key * le_key, const struct cpu_key * cpu_key) { __u32 * p_s_le_u32, * p_s_cpu_u32; @@ -119,7 +119,7 @@ Compare keys using all 4 key fields. Returns: -1 if key1 < key2 0 if key1 = key2 1 if key1 > key2 */ -inline int comp_keys (const struct key * le_key, const struct cpu_key * cpu_key) +KSTATIC inline int comp_keys (const struct key * le_key, const struct cpu_key * cpu_key) { int retval; @@ -148,7 +148,7 @@ // // FIXME: not used yet // -inline int comp_cpu_keys (const struct cpu_key * key1, +KSTATIC inline int comp_cpu_keys (const struct cpu_key * key1, const struct cpu_key * key2) { if (key1->on_disk_key.k_dir_id < key2->on_disk_key.k_dir_id) @@ -176,7 +176,7 @@ return 0; } -inline int comp_short_le_keys (const struct key * key1, const struct key * key2) +KSTATIC inline int comp_short_le_keys (const struct key * key1, const struct key * key2) { __u32 * p_s_1_u32, * p_s_2_u32; int n_key_length = REISERFS_SHORT_KEY_LEN; @@ -192,7 +192,7 @@ return 0; } -inline int comp_short_cpu_keys (const struct cpu_key * key1, +KSTATIC inline int comp_short_cpu_keys (const struct cpu_key * key1, const struct cpu_key * key2) { __u32 * p_s_1_u32, * p_s_2_u32; @@ -212,13 +212,13 @@ -inline void cpu_key2cpu_key (struct cpu_key * to, const struct cpu_key * from) +KSTATIC inline void cpu_key2cpu_key (struct cpu_key * to, const struct cpu_key * from) { memcpy (to, from, sizeof (struct cpu_key)); } -inline void le_key2cpu_key (struct cpu_key * to, const struct key * from) +KSTATIC inline void le_key2cpu_key (struct cpu_key * to, const struct key * from) { to->on_disk_key.k_dir_id = le32_to_cpu (from->k_dir_id); to->on_disk_key.k_objectid = le32_to_cpu (from->k_objectid); @@ -238,7 +238,7 @@ // this does not say which one is bigger, it only returns 1 if keys // are not equal, 0 otherwise -inline int comp_le_keys (const struct key * k1, const struct key * k2) +KSTATIC inline int comp_le_keys (const struct key * k1, const struct key * k2) { return memcmp (k1, k2, sizeof (struct key)); } @@ -257,7 +257,7 @@ there are no possible items, and we have not found it. With each examination we cut the number of possible items it could be by one more than half rounded down, or we find it. */ -inline int bin_search ( +KSTATIC inline int bin_search ( const void * p_v_key, /* Key to search for. */ const void * p_v_base,/* First item in the array. */ int p_n_num, /* Number of items in the array. */ @@ -287,23 +287,23 @@ } #ifdef CONFIG_REISERFS_CHECK -extern struct tree_balance * cur_tb; +KSTATIC struct tree_balance * cur_tb; #endif /* Minimal possible key. It is never in the tree. */ -const struct key MIN_KEY = {0, 0, {{0, 0},}}; +KSTATIC const struct key MIN_KEY = {0, 0, {{0, 0},}}; /* Maximal possible key. It is never in the tree. */ -const struct key MAX_KEY = {0xffffffff, 0xffffffff, {{0xffffffff, 0xffffffff},}}; +KSTATIC const struct key MAX_KEY = {0xffffffff, 0xffffffff, {{0xffffffff, 0xffffffff},}}; /* Get delimiting key of the buffer by looking for it in the buffers in the path, starting from the bottom of the path, and going upwards. We must check the path's validity at each step. If the key is not in the path, there is no delimiting key in the tree (buffer is first or last buffer in tree), and in this case we return a special key, either MIN_KEY or MAX_KEY. */ -inline const struct key * get_lkey ( +KSTATIC inline const struct key * get_lkey ( const struct path * p_s_chk_path, const struct super_block * p_s_sb ) { @@ -342,7 +342,7 @@ /* Get delimiting key of the buffer at the path and its right neighbor. */ -inline const struct key * get_rkey ( +KSTATIC inline const struct key * get_rkey ( const struct path * p_s_chk_path, const struct super_block * p_s_sb ) { @@ -409,7 +409,7 @@ } -inline void decrement_bcount( +KSTATIC inline void decrement_bcount( struct buffer_head * p_s_bh ) { if ( p_s_bh ) { @@ -423,7 +423,7 @@ /* Decrement b_count field of the all buffers in the path. */ -void decrement_counters_in_path ( +KSTATIC void decrement_counters_in_path ( struct path * p_s_search_path ) { int n_path_offset = p_s_search_path->path_length; @@ -442,7 +442,7 @@ } -int reiserfs_check_path(struct path *p) { +KSTATIC int reiserfs_check_path(struct path *p) { RFALSE( p->path_length != ILLEGAL_PATH_ELEMENT_OFFSET, "path not properly relsed") ; return 0 ; @@ -454,7 +454,7 @@ ** ** only called from fix_nodes() */ -void pathrelse_and_restore ( +KSTATIC void pathrelse_and_restore ( struct super_block *s, struct path * p_s_search_path ) { @@ -472,7 +472,7 @@ } /* Release all buffers in the path. */ -void pathrelse ( +KSTATIC void pathrelse ( struct path * p_s_search_path ) { int n_path_offset = p_s_search_path->path_length; @@ -637,7 +637,7 @@ correctness of the top of the path but need not be checked for the correctness of the bottom of the path */ /* The function is NOT SCHEDULE-SAFE! */ -int search_by_key (struct super_block * p_s_sb, +KSTATIC int search_by_key (struct super_block * p_s_sb, const struct cpu_key * p_s_key, /* Key to search. */ struct path * p_s_search_path, /* This structure was allocated and initialized @@ -802,7 +802,7 @@ units of directory entries. */ /* The function is NOT SCHEDULE-SAFE! */ -int search_for_position_by_key (struct super_block * p_s_sb, /* Pointer to the super block. */ +KSTATIC int search_for_position_by_key (struct super_block * p_s_sb, /* Pointer to the super block. */ const struct cpu_key * p_cpu_key, /* Key to search (cpu variable) */ struct path * p_s_search_path /* Filled up by this function. */ ) { @@ -871,7 +871,7 @@ /* Compare given item and item pointed to by the path. */ -int comp_items (const struct item_head * stored_ih, const struct path * p_s_path) +KSTATIC int comp_items (const struct item_head * stored_ih, const struct path * p_s_path) { struct buffer_head * p_s_bh; struct item_head * ih; @@ -1147,7 +1147,7 @@ /* Calculate bytes number which will be deleted or cutted in the balance. */ -int calc_deleted_bytes_number( +KSTATIC int calc_deleted_bytes_number( struct tree_balance * p_s_tb, char c_mode ) { @@ -1190,7 +1190,7 @@ -void padd_item (char * item, int total_length, int length) +KSTATIC void padd_item (char * item, int total_length, int length) { int i; @@ -1200,7 +1200,7 @@ /* Delete object item. */ -int reiserfs_delete_item (struct reiserfs_transaction_handle *th, +KSTATIC int reiserfs_delete_item (struct reiserfs_transaction_handle *th, struct path * p_s_path, /* Path to the deleted item. */ const struct cpu_key * p_s_item_key, /* Key to search for the deleted item. */ struct inode * p_s_inode,/* inode is here just to update i_blocks */ @@ -1365,7 +1365,7 @@ } -void reiserfs_delete_object (struct reiserfs_transaction_handle *th, struct inode * inode) +KSTATIC void reiserfs_delete_object (struct reiserfs_transaction_handle *th, struct inode * inode) { inode->i_size = 0; @@ -1466,7 +1466,7 @@ /* (Truncate or cut entry) or delete object item. Returns < 0 on failure */ -int reiserfs_cut_from_item (struct reiserfs_transaction_handle *th, +KSTATIC int reiserfs_cut_from_item (struct reiserfs_transaction_handle *th, struct path * p_s_path, struct cpu_key * p_s_item_key, struct inode * p_s_inode, @@ -1643,7 +1643,7 @@ /* Truncate file to the new size. Note, this must be called with a transaction already started */ -void reiserfs_do_truncate (struct reiserfs_transaction_handle *th, +KSTATIC void reiserfs_do_truncate (struct reiserfs_transaction_handle *th, struct inode * p_s_inode, /* ->i_size contains new size */ struct page *page, /* up to date for last block */ @@ -1797,7 +1797,7 @@ /* Paste bytes to the existing item. Returns bytes number pasted into the item. */ -int reiserfs_paste_into_item (struct reiserfs_transaction_handle *th, +KSTATIC int reiserfs_paste_into_item (struct reiserfs_transaction_handle *th, struct path * p_s_search_path, /* Path to the pasted item. */ const struct cpu_key * p_s_key, /* Key to search for the needed item.*/ const char * p_c_body, /* Pointer to the bytes to paste. */ @@ -1841,7 +1841,7 @@ /* Insert new item into the buffer at the path. */ -int reiserfs_insert_item(struct reiserfs_transaction_handle *th, +KSTATIC int reiserfs_insert_item(struct reiserfs_transaction_handle *th, struct path * p_s_path, /* Path to the inserteded item. */ const struct cpu_key * key, struct item_head * p_s_ih, /* Pointer to the item header to insert.*/ diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/super.c linux-e2all/fs/reiserfs/super.c --- linux-2.4.17-pre2/fs/reiserfs/super.c Fri Nov 9 22:18:25 2001 +++ linux-e2all/fs/reiserfs/super.c Sun Dec 2 11:53:01 2001 @@ -23,8 +23,8 @@ #define REISERFS_OLD_BLOCKSIZE 4096 #define REISERFS_SUPER_MAGIC_STRING_OFFSET_NJ 20 -char reiserfs_super_magic_string[] = REISERFS_SUPER_MAGIC_STRING; -char reiser2fs_super_magic_string[] = REISER2FS_SUPER_MAGIC_STRING; +KSTATIC char reiserfs_super_magic_string[] = REISERFS_SUPER_MAGIC_STRING; +KSTATIC char reiser2fs_super_magic_string[] = REISER2FS_SUPER_MAGIC_STRING; // // a portion of this function, particularly the VFS interface portion, @@ -33,7 +33,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -void reiserfs_write_super (struct super_block * s) +KSTATIC void reiserfs_write_super (struct super_block * s) { int dirty = 0 ; @@ -52,7 +52,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -void reiserfs_write_super_lockfs (struct super_block * s) +KSTATIC void reiserfs_write_super_lockfs (struct super_block * s) { int dirty = 0 ; @@ -69,7 +69,7 @@ unlock_kernel() ; } -void reiserfs_unlockfs(struct super_block *s) { +KSTATIC void reiserfs_unlockfs(struct super_block *s) { reiserfs_allow_writes(s) ; } @@ -80,7 +80,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -void reiserfs_put_super (struct super_block * s) +KSTATIC void reiserfs_put_super (struct super_block * s) { int i; struct reiserfs_transaction_handle th ; @@ -123,7 +123,7 @@ return; } -struct super_operations reiserfs_sops = +KSTATIC struct super_operations reiserfs_sops = { read_inode: reiserfs_read_inode, read_inode2: reiserfs_read_inode2, @@ -219,7 +219,7 @@ } -int reiserfs_is_super(struct super_block *s) { +KSTATIC int reiserfs_is_super(struct super_block *s) { return (s->s_dev != 0 && s->s_op == &reiserfs_sops) ; } @@ -231,7 +231,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -int reiserfs_remount (struct super_block * s, int * flags, char * data) +KSTATIC int reiserfs_remount (struct super_block * s, int * flags, char * data) { struct reiserfs_super_block * rs; struct reiserfs_transaction_handle th ; @@ -337,7 +337,7 @@ return 0; } -void check_bitmap (struct super_block * s) +KSTATIC void check_bitmap (struct super_block * s) { int i = 0; int free = 0; @@ -467,7 +467,7 @@ // FIXME: we look for only one name in a directory. If tea and yura // bith have the same value - we ask user to send report to the // mailing list -__u32 find_hash_out (struct super_block * s) +KSTATIC __u32 find_hash_out (struct super_block * s) { int retval; struct inode * inode; @@ -587,7 +587,7 @@ } // this is used to set up correct value for old partitions -int function2code (hashf_t func) +KSTATIC int function2code (hashf_t func) { if (func == keyed_hash) return TEA_HASH; @@ -608,7 +608,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -struct super_block * reiserfs_read_super (struct super_block * s, void * data, int silent) +KSTATIC struct super_block * reiserfs_read_super (struct super_block * s, void * data, int silent) { int size; struct inode *root_inode; @@ -792,7 +792,7 @@ // at the ext2 code and comparing. It's subfunctions contain no code // used as a template unless they are so labeled. // -int reiserfs_statfs (struct super_block * s, struct statfs * buf) +KSTATIC int reiserfs_statfs (struct super_block * s, struct statfs * buf) { struct reiserfs_super_block * rs = SB_DISK_SUPER_BLOCK (s); diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/tail_conversion.c linux-e2all/fs/reiserfs/tail_conversion.c --- linux-2.4.17-pre2/fs/reiserfs/tail_conversion.c Tue Oct 30 23:11:34 2001 +++ linux-e2all/fs/reiserfs/tail_conversion.c Sun Dec 2 11:52:04 2001 @@ -16,7 +16,7 @@ tail. -ENOSPC if no disk space for conversion */ /* path points to first direct item of the file regarless of how many of them are there */ -int direct2indirect (struct reiserfs_transaction_handle *th, struct inode * inode, +KSTATIC int direct2indirect (struct reiserfs_transaction_handle *th, struct inode * inode, struct path * path, struct buffer_head * unbh, loff_t tail_offset) { @@ -132,7 +132,7 @@ /* stolen from fs/buffer.c */ -void reiserfs_unmap_buffer(struct buffer_head *bh) { +KSTATIC void reiserfs_unmap_buffer(struct buffer_head *bh) { if (buffer_mapped(bh)) { if (buffer_journaled(bh) || buffer_journal_dirty(bh)) { BUG() ; @@ -185,7 +185,7 @@ what we expect from it (number of cut bytes). But when tail remains in the unformatted node, we set mode to SKIP_BALANCING and unlock inode */ -int indirect2direct (struct reiserfs_transaction_handle *th, +KSTATIC int indirect2direct (struct reiserfs_transaction_handle *th, struct inode * p_s_inode, struct page *page, struct path * p_s_path, /* path to the indirect item. */ diff -Naur -X /g/g/lib/dontdiff linux-2.4.17-pre2/fs/reiserfs/version.c linux-e2all/fs/reiserfs/version.c --- linux-2.4.17-pre2/fs/reiserfs/version.c Mon Jan 15 20:42:32 2001 +++ linux-e2all/fs/reiserfs/version.c Sun Dec 2 12:32:44 2001 @@ -2,6 +2,7 @@ * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README */ -char *reiserfs_get_version_string(void) { +KSTATIC const char *reiserfs_get_version_string(void) +{ return "ReiserFS version 3.6.25" ; }