aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2013-08-11 16:31:42 -0400
committerJeff Mahoney <jeffm@suse.com>2013-08-26 17:17:38 -0400
commit863ef57982edf9522558db0cb145a9252f7c4ee8 (patch)
treed116e49559490c82b6099c3852a9b65ab6481fca
parent45964148f54f41942ca813e1dd28a076d9737e6e (diff)
downloadreiserfsprogs-863ef57982edf9522558db0cb145a9252f7c4ee8.tar.gz
cleanup: remove dead code
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
-rw-r--r--include/reiserfs_fs.h38
-rw-r--r--include/reiserfs_lib.h5
-rw-r--r--reiserfscore/fix_node.c23
-rw-r--r--reiserfscore/reiserfslib.c5
4 files changed, 3 insertions, 68 deletions
diff --git a/include/reiserfs_fs.h b/include/reiserfs_fs.h
index a05ea60..df1a0f4 100644
--- a/include/reiserfs_fs.h
+++ b/include/reiserfs_fs.h
@@ -34,12 +34,6 @@
typedef unsigned int blocknr_t;
-#ifndef NO_EXTERN_INLINE
-# define extern_inline extern inline
-#else
-# define extern_inline
-#endif
-
#ifndef get_unaligned
#define get_unaligned(ptr) \
({ \
@@ -668,29 +662,6 @@ void set_ih_key_format(struct item_head *ih, __u16 val);
#define IH_Checked 2
#define IH_Writable 3
-/* Bad item flag is set temporary by recover_leaf */
-/*
-extern_inline __u16 mark_ih_bad( struct item_head *ih )
-{
- set_ih_flags(ih, get_ih_flags(ih) | IH_Bad );
- return get_ih_flags(ih);
-}
-
-extern_inline __u16 ih_bad( struct item_head *ih )
-{
- __u16 tmp = get_ih_flags(ih);
- return test_bit(IH_Bad, &tmp );
-}
-
-extern_inline __u16 unmark_item_bad( struct item_head *ih )
-{
- __u16 tmp = get_ih_flags(ih);
- clear_bit( IH_Bad, &tmp );
- set_ih_flags( ih, tmp );
- return tmp;
-}
-*/
-
/* Unreachable bit is set on tree rebuilding and is cleared in semantic pass */
#define clean_ih_flags(ih) set_ih_flags (ih, 0)
@@ -1141,11 +1112,6 @@ struct reiserfs_path var = {ILLEGAL_PATH_ELEMENT_OFFSET, }
#define REGULAR_FILE_FOUND 14
#define DIRECTORY_FOUND 15
-struct unfm_nodeinfo {
- __u32 unfm_nodenum;
- __u16 unfm_freespace;
-};
-
/* Size of pointer to the unformatted node. */
#define UNFM_P_SIZE (sizeof(__u32))
@@ -1452,9 +1418,7 @@ int are_items_mergeable (struct item_head * left, struct item_head * right, int
/* fix_nodes.c */
-void *reiserfs_kmalloc (size_t size, int flags, reiserfs_filsys_t * s);
-void reiserfs_kfree (/*const*/ void * vp, size_t size, reiserfs_filsys_t * s);
-int fix_nodes (/*struct reiserfs_transaction_handle *th,*/ int n_op_mode, struct tree_balance * p_s_tb,
+int fix_nodes (/*struct reiserfs_transaction_handle *th,*/ int n_op_mode, struct tree_balance * p_s_tb,
/*int n_pos_in_item,*/ struct item_head * p_s_ins_ih);
void unfix_nodes (/*struct reiserfs_transaction_handle *th,*/ struct tree_balance *);
void free_buffers_in_tb (struct tree_balance * p_s_tb);
diff --git a/include/reiserfs_lib.h b/include/reiserfs_lib.h
index ac9babd..087d471 100644
--- a/include/reiserfs_lib.h
+++ b/include/reiserfs_lib.h
@@ -132,9 +132,8 @@ int reiserfs_search_by_entry_key(reiserfs_filsys_t *, struct reiserfs_key *key,
int usearch_by_position(reiserfs_filsys_t *, struct reiserfs_key *key,
int version, struct reiserfs_path *path);
struct reiserfs_key *reiserfs_next_key(struct reiserfs_path *path);
-void copy_key(void *to, void *from);
-void copy_short_key(void *to, void *from);
-void copy_item_head(void *p_v_to, void *p_v_from);
+void copy_key(void *to, const void *from);
+void copy_short_key(void *to, const void *from);
int comp_keys(const void *k1, const void *k2);
int comp_keys_3(const void *k1, const void *k2);
int comp_short_keys(const void *p_s_key1, const void *p_s_key2);
diff --git a/reiserfscore/fix_node.c b/reiserfscore/fix_node.c
index abf7d88..f09fe58 100644
--- a/reiserfscore/fix_node.c
+++ b/reiserfscore/fix_node.c
@@ -2283,29 +2283,6 @@ static int get_neighbors(struct tree_balance *p_s_tb, int n_h)
return CARRY_ON;
}
-#if 0
-void * reiserfs_kmalloc (size_t size, int flags, struct super_block * s)
-{
- void * vp;
-
- vp = getmem (size);
- return vp;
-}
-
-void reiserfs_kfree (/*const */void * vp, size_t size, struct super_block * s)
-{
- freemem (vp);
-
- kfree (vp);
-
- s->u.reiserfs_sb.s_kmallocs -= size;
- if (s->u.reiserfs_sb.s_kmallocs < 0)
- reiserfs_warning("vs-8302: reiserfs_kfree: allocated memory %d\n",
- s->u.reiserfs_sb.s_kmallocs);
-
-#endif
-
-
static int get_mem_for_virtual_node(struct tree_balance *tb)
{
tb->vn_buf = getmem(tb->tb_fs->fs_blocksize);
diff --git a/reiserfscore/reiserfslib.c b/reiserfscore/reiserfslib.c
index 14cb957..9446890 100644
--- a/reiserfscore/reiserfslib.c
+++ b/reiserfscore/reiserfslib.c
@@ -1151,11 +1151,6 @@ void copy_short_key(void *to, void *from)
memcpy(to, from, SHORT_KEY_SIZE);
}
-void copy_item_head(void *p_v_to, void *p_v_from)
-{
- memcpy(p_v_to, p_v_from, IH_SIZE);
-}
-
/* inserts new or old stat data of a directory (unreachable, nlinks == 0) */
int create_dir_sd(reiserfs_filsys_t *fs,
struct reiserfs_path *path, struct reiserfs_key *key,