From: Adrian Bunk - make the following needlessly global function static: - plugin/file/file.c: hint_validate() - #if 0 the following unused global function: - jnode.c: page_detach_jnode() Signed-off-by: Adrian Bunk Cc: "Vladimir V. Saveliev" Cc: Hans Reiser Signed-off-by: Andrew Morton --- fs/reiser4/jnode.c | 2 ++ fs/reiser4/jnode.h | 3 --- fs/reiser4/plugin/file/file.c | 4 +++- fs/reiser4/plugin/file/file.h | 2 -- 4 files changed, 5 insertions(+), 6 deletions(-) diff -puN fs/reiser4/jnode.c~reiser4-possible-cleanups-2 fs/reiser4/jnode.c --- a/fs/reiser4/jnode.c~reiser4-possible-cleanups-2 +++ a/fs/reiser4/jnode.c @@ -697,6 +697,7 @@ void page_clear_jnode(struct page *page, page_cache_release(page); } +#if 0 /* it is only used in one place to handle error */ void page_detach_jnode(struct page *page, struct address_space *mapping, @@ -716,6 +717,7 @@ page_detach_jnode(struct page *page, str } unlock_page(page); } +#endif /* 0 */ /* return @node page locked. diff -puN fs/reiser4/jnode.h~reiser4-possible-cleanups-2 fs/reiser4/jnode.h --- a/fs/reiser4/jnode.h~reiser4-possible-cleanups-2 +++ a/fs/reiser4/jnode.h @@ -486,9 +486,6 @@ static inline int jnode_is_loaded(const return atomic_read(&node->d_count) > 0; } -extern void page_detach_jnode(struct page *page, - struct address_space *mapping, - unsigned long index) NONNULL; extern void page_clear_jnode(struct page *page, jnode * node) NONNULL; static inline void jnode_set_reloc(jnode * node) diff -puN fs/reiser4/plugin/file/file.c~reiser4-possible-cleanups-2 fs/reiser4/plugin/file/file.c --- a/fs/reiser4/plugin/file/file.c~reiser4-possible-cleanups-2 +++ a/fs/reiser4/plugin/file/file.c @@ -26,6 +26,8 @@ static int unpack(struct file *file, struct inode *inode, int forever); static void drop_access(unix_file_info_t *); +static int hint_validate(hint_t * hint, const reiser4_key * key, int check_key, + znode_lock_mode lock_mode); /* get unix file plugin specific portion of inode */ unix_file_info_t *unix_file_inode_data(const struct inode *inode) @@ -747,7 +749,7 @@ static int all_but_offset_key_eq(const r } #endif -int +static int hint_validate(hint_t * hint, const reiser4_key * key, int check_key, znode_lock_mode lock_mode) { diff -puN fs/reiser4/plugin/file/file.h~reiser4-possible-cleanups-2 fs/reiser4/plugin/file/file.h --- a/fs/reiser4/plugin/file/file.h~reiser4-possible-cleanups-2 +++ a/fs/reiser4/plugin/file/file.h @@ -157,8 +157,6 @@ struct hint { void reiser4_set_hint(hint_t *, const reiser4_key *, znode_lock_mode); int hint_is_set(const hint_t *); void reiser4_unset_hint(hint_t *); -int hint_validate(hint_t *, const reiser4_key *, int check_key, - znode_lock_mode); void hint_init_zero(hint_t *); int reiser4_update_file_size(struct inode *, reiser4_key *, int update_sd); _