mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
792ddef040
commit
33b98f2271
2 changed files with 0 additions and 71 deletions
|
@ -3587,12 +3587,6 @@ int btrfs_del_inode_ref(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_root *root,
|
struct btrfs_root *root,
|
||||||
const char *name, int name_len,
|
const char *name, int name_len,
|
||||||
u64 inode_objectid, u64 ref_objectid, u64 *index);
|
u64 inode_objectid, u64 ref_objectid, u64 *index);
|
||||||
int btrfs_get_inode_ref_index(struct btrfs_trans_handle *trans,
|
|
||||||
struct btrfs_root *root,
|
|
||||||
struct btrfs_path *path,
|
|
||||||
const char *name, int name_len,
|
|
||||||
u64 inode_objectid, u64 ref_objectid, int mod,
|
|
||||||
u64 *ret_index);
|
|
||||||
int btrfs_insert_empty_inode(struct btrfs_trans_handle *trans,
|
int btrfs_insert_empty_inode(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_root *root,
|
struct btrfs_root *root,
|
||||||
struct btrfs_path *path, u64 objectid);
|
struct btrfs_path *path, u64 objectid);
|
||||||
|
|
|
@ -91,32 +91,6 @@ int btrfs_find_name_in_ext_backref(struct btrfs_path *path, u64 ref_objectid,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct btrfs_inode_ref *
|
|
||||||
btrfs_lookup_inode_ref(struct btrfs_trans_handle *trans,
|
|
||||||
struct btrfs_root *root,
|
|
||||||
struct btrfs_path *path,
|
|
||||||
const char *name, int name_len,
|
|
||||||
u64 inode_objectid, u64 ref_objectid, int ins_len,
|
|
||||||
int cow)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
struct btrfs_key key;
|
|
||||||
struct btrfs_inode_ref *ref;
|
|
||||||
|
|
||||||
key.objectid = inode_objectid;
|
|
||||||
key.type = BTRFS_INODE_REF_KEY;
|
|
||||||
key.offset = ref_objectid;
|
|
||||||
|
|
||||||
ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow);
|
|
||||||
if (ret < 0)
|
|
||||||
return ERR_PTR(ret);
|
|
||||||
if (ret > 0)
|
|
||||||
return NULL;
|
|
||||||
if (!find_name_in_backref(path, name, name_len, &ref))
|
|
||||||
return NULL;
|
|
||||||
return ref;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns NULL if no extref found */
|
/* Returns NULL if no extref found */
|
||||||
struct btrfs_inode_extref *
|
struct btrfs_inode_extref *
|
||||||
btrfs_lookup_inode_extref(struct btrfs_trans_handle *trans,
|
btrfs_lookup_inode_extref(struct btrfs_trans_handle *trans,
|
||||||
|
@ -144,45 +118,6 @@ btrfs_lookup_inode_extref(struct btrfs_trans_handle *trans,
|
||||||
return extref;
|
return extref;
|
||||||
}
|
}
|
||||||
|
|
||||||
int btrfs_get_inode_ref_index(struct btrfs_trans_handle *trans,
|
|
||||||
struct btrfs_root *root,
|
|
||||||
struct btrfs_path *path,
|
|
||||||
const char *name, int name_len,
|
|
||||||
u64 inode_objectid, u64 ref_objectid, int mod,
|
|
||||||
u64 *ret_index)
|
|
||||||
{
|
|
||||||
struct btrfs_inode_ref *ref;
|
|
||||||
struct btrfs_inode_extref *extref;
|
|
||||||
int ins_len = mod < 0 ? -1 : 0;
|
|
||||||
int cow = mod != 0;
|
|
||||||
|
|
||||||
ref = btrfs_lookup_inode_ref(trans, root, path, name, name_len,
|
|
||||||
inode_objectid, ref_objectid, ins_len,
|
|
||||||
cow);
|
|
||||||
if (IS_ERR(ref))
|
|
||||||
return PTR_ERR(ref);
|
|
||||||
|
|
||||||
if (ref != NULL) {
|
|
||||||
*ret_index = btrfs_inode_ref_index(path->nodes[0], ref);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
btrfs_release_path(path);
|
|
||||||
|
|
||||||
extref = btrfs_lookup_inode_extref(trans, root, path, name,
|
|
||||||
name_len, inode_objectid,
|
|
||||||
ref_objectid, ins_len, cow);
|
|
||||||
if (IS_ERR(extref))
|
|
||||||
return PTR_ERR(extref);
|
|
||||||
|
|
||||||
if (extref) {
|
|
||||||
*ret_index = btrfs_inode_extref_index(path->nodes[0], extref);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return -ENOENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int btrfs_del_inode_extref(struct btrfs_trans_handle *trans,
|
static int btrfs_del_inode_extref(struct btrfs_trans_handle *trans,
|
||||||
struct btrfs_root *root,
|
struct btrfs_root *root,
|
||||||
const char *name, int name_len,
|
const char *name, int name_len,
|
||||||
|
|
Loading…
Add table
Reference in a new issue