Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

btrfs: cleanup: removed unused 'btrfs_get_inode_ref_index'

Found by uselex.rb:
> btrfs_get_inode_ref_index: [R]: exported from:
fs/btrfs/inode-item.o fs/btrfs/btrfs.o fs/btrfs/built-in.o

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Reviewed-by: David Stebra <dsterba@suse.cz>
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <clm@fb.com>

authored by

Sergei Trofimovich and committed by
Chris Mason
33b98f22 792ddef0

-71
-6
fs/btrfs/ctree.h
··· 3587 3587 struct btrfs_root *root, 3588 3588 const char *name, int name_len, 3589 3589 u64 inode_objectid, u64 ref_objectid, u64 *index); 3590 - int btrfs_get_inode_ref_index(struct btrfs_trans_handle *trans, 3591 - struct btrfs_root *root, 3592 - struct btrfs_path *path, 3593 - const char *name, int name_len, 3594 - u64 inode_objectid, u64 ref_objectid, int mod, 3595 - u64 *ret_index); 3596 3590 int btrfs_insert_empty_inode(struct btrfs_trans_handle *trans, 3597 3591 struct btrfs_root *root, 3598 3592 struct btrfs_path *path, u64 objectid);
-65
fs/btrfs/inode-item.c
··· 91 91 return 0; 92 92 } 93 93 94 - static struct btrfs_inode_ref * 95 - btrfs_lookup_inode_ref(struct btrfs_trans_handle *trans, 96 - struct btrfs_root *root, 97 - struct btrfs_path *path, 98 - const char *name, int name_len, 99 - u64 inode_objectid, u64 ref_objectid, int ins_len, 100 - int cow) 101 - { 102 - int ret; 103 - struct btrfs_key key; 104 - struct btrfs_inode_ref *ref; 105 - 106 - key.objectid = inode_objectid; 107 - key.type = BTRFS_INODE_REF_KEY; 108 - key.offset = ref_objectid; 109 - 110 - ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); 111 - if (ret < 0) 112 - return ERR_PTR(ret); 113 - if (ret > 0) 114 - return NULL; 115 - if (!find_name_in_backref(path, name, name_len, &ref)) 116 - return NULL; 117 - return ref; 118 - } 119 - 120 94 /* Returns NULL if no extref found */ 121 95 struct btrfs_inode_extref * 122 96 btrfs_lookup_inode_extref(struct btrfs_trans_handle *trans, ··· 116 142 if (!btrfs_find_name_in_ext_backref(path, ref_objectid, name, name_len, &extref)) 117 143 return NULL; 118 144 return extref; 119 - } 120 - 121 - int btrfs_get_inode_ref_index(struct btrfs_trans_handle *trans, 122 - struct btrfs_root *root, 123 - struct btrfs_path *path, 124 - const char *name, int name_len, 125 - u64 inode_objectid, u64 ref_objectid, int mod, 126 - u64 *ret_index) 127 - { 128 - struct btrfs_inode_ref *ref; 129 - struct btrfs_inode_extref *extref; 130 - int ins_len = mod < 0 ? -1 : 0; 131 - int cow = mod != 0; 132 - 133 - ref = btrfs_lookup_inode_ref(trans, root, path, name, name_len, 134 - inode_objectid, ref_objectid, ins_len, 135 - cow); 136 - if (IS_ERR(ref)) 137 - return PTR_ERR(ref); 138 - 139 - if (ref != NULL) { 140 - *ret_index = btrfs_inode_ref_index(path->nodes[0], ref); 141 - return 0; 142 - } 143 - 144 - btrfs_release_path(path); 145 - 146 - extref = btrfs_lookup_inode_extref(trans, root, path, name, 147 - name_len, inode_objectid, 148 - ref_objectid, ins_len, cow); 149 - if (IS_ERR(extref)) 150 - return PTR_ERR(extref); 151 - 152 - if (extref) { 153 - *ret_index = btrfs_inode_extref_index(path->nodes[0], extref); 154 - return 0; 155 - } 156 - 157 - return -ENOENT; 158 145 } 159 146 160 147 static int btrfs_del_inode_extref(struct btrfs_trans_handle *trans,