Skip to content

Commit 8312c87

Browse files
Dr. David Alan GilbertChristoph Hellwig
authored andcommitted
configfs: remove unused configfs_hash_and_remove
configfs_hash_and_remove() has been unused since it was added in 2005 by commit 7063fbf ("[PATCH] configfs: User-driven configuration filesystem") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 0a9b9d1 commit 8312c87

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

fs/configfs/configfs_internal.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ extern int configfs_make_dirent(struct configfs_dirent *, struct dentry *,
7373
void *, umode_t, int, struct configfs_fragment *);
7474
extern int configfs_dirent_is_ready(struct configfs_dirent *);
7575

76-
extern void configfs_hash_and_remove(struct dentry * dir, const char * name);
77-
7876
extern const unsigned char * configfs_get_name(struct configfs_dirent *sd);
7977
extern void configfs_drop_dentry(struct configfs_dirent *sd, struct dentry *parent);
8078
extern int configfs_setattr(struct mnt_idmap *idmap,

fs/configfs/inode.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -216,28 +216,3 @@ void configfs_drop_dentry(struct configfs_dirent * sd, struct dentry * parent)
216216
spin_unlock(&dentry->d_lock);
217217
}
218218
}
219-
220-
void configfs_hash_and_remove(struct dentry * dir, const char * name)
221-
{
222-
struct configfs_dirent * sd;
223-
struct configfs_dirent * parent_sd = dir->d_fsdata;
224-
225-
if (d_really_is_negative(dir))
226-
/* no inode means this hasn't been made visible yet */
227-
return;
228-
229-
inode_lock(d_inode(dir));
230-
list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
231-
if (!sd->s_element)
232-
continue;
233-
if (!strcmp(configfs_get_name(sd), name)) {
234-
spin_lock(&configfs_dirent_lock);
235-
list_del_init(&sd->s_sibling);
236-
spin_unlock(&configfs_dirent_lock);
237-
configfs_drop_dentry(sd, dir);
238-
configfs_put(sd);
239-
break;
240-
}
241-
}
242-
inode_unlock(d_inode(dir));
243-
}

0 commit comments

Comments
 (0)