diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2013-11-13 04:46:48 -0500 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-28 16:19:39 -0500 |
commit | 33b98f22711142b7f92ad8e10f21fc3f921ffde2 (patch) | |
tree | ca4d379a35ed411b7a51bfe9d92b7ad817814fb0 /fs/btrfs/inode-item.c | |
parent | 792ddef04014d83cc5a8c4d1387c0417789b36fa (diff) |
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>
Diffstat (limited to 'fs/btrfs/inode-item.c')
-rw-r--r-- | fs/btrfs/inode-item.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/fs/btrfs/inode-item.c b/fs/btrfs/inode-item.c index ec82fae07097..2be38df703c9 100644 --- a/fs/btrfs/inode-item.c +++ b/fs/btrfs/inode-item.c | |||
@@ -91,32 +91,6 @@ int btrfs_find_name_in_ext_backref(struct btrfs_path *path, u64 ref_objectid, | |||
91 | return 0; | 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 | /* Returns NULL if no extref found */ | 94 | /* Returns NULL if no extref found */ |
121 | struct btrfs_inode_extref * | 95 | struct btrfs_inode_extref * |
122 | btrfs_lookup_inode_extref(struct btrfs_trans_handle *trans, | 96 | btrfs_lookup_inode_extref(struct btrfs_trans_handle *trans, |
@@ -144,45 +118,6 @@ btrfs_lookup_inode_extref(struct btrfs_trans_handle *trans, | |||
144 | return extref; | 118 | return extref; |
145 | } | 119 | } |
146 | 120 | ||
147 | int btrfs_get_inode_ref_index(struct btrfs_trans_handle *trans, | ||
148 | struct btrfs_root *root, | ||
149 | struct btrfs_path *path, | ||
150 | const char *name, int name_len, | ||
151 | u64 inode_objectid, u64 ref_objectid, int mod, | ||
152 | u64 *ret_index) | ||
153 | { | ||
154 | struct btrfs_inode_ref *ref; | ||
155 | struct btrfs_inode_extref *extref; | ||
156 | int ins_len = mod < 0 ? -1 : 0; | ||
157 | int cow = mod != 0; | ||
158 | |||
159 | ref = btrfs_lookup_inode_ref(trans, root, path, name, name_len, | ||
160 | inode_objectid, ref_objectid, ins_len, | ||
161 | cow); | ||
162 | if (IS_ERR(ref)) | ||
163 | return PTR_ERR(ref); | ||
164 | |||
165 | if (ref != NULL) { | ||
166 | *ret_index = btrfs_inode_ref_index(path->nodes[0], ref); | ||
167 | return 0; | ||
168 | } | ||
169 | |||
170 | btrfs_release_path(path); | ||
171 | |||
172 | extref = btrfs_lookup_inode_extref(trans, root, path, name, | ||
173 | name_len, inode_objectid, | ||
174 | ref_objectid, ins_len, cow); | ||
175 | if (IS_ERR(extref)) | ||
176 | return PTR_ERR(extref); | ||
177 | |||
178 | if (extref) { | ||
179 | *ret_index = btrfs_inode_extref_index(path->nodes[0], extref); | ||
180 | return 0; | ||
181 | } | ||
182 | |||
183 | return -ENOENT; | ||
184 | } | ||
185 | |||
186 | static int btrfs_del_inode_extref(struct btrfs_trans_handle *trans, | 121 | static int btrfs_del_inode_extref(struct btrfs_trans_handle *trans, |
187 | struct btrfs_root *root, | 122 | struct btrfs_root *root, |
188 | const char *name, int name_len, | 123 | const char *name, int name_len, |