aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-06-23 17:16:44 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2018-06-23 17:16:44 -0400
commit63a67a926e214dac94e29147c0f3d11499f655a1 (patch)
tree4c137cf8cfb2e4775a6dc82cec74e0480b0a741a
parentce397d215ccd07b8ae3f71db689aedb85d56ab40 (diff)
kill dentry_update_name_case()
the last user is gone Spotted-by: Richard Weinberger <richard@nod.at> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/dcache.c27
-rw-r--r--include/linux/dcache.h2
2 files changed, 0 insertions, 29 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 0e8e5de3c48a..d9323af88ed0 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2676,33 +2676,6 @@ struct dentry *d_exact_alias(struct dentry *entry, struct inode *inode)
2676} 2676}
2677EXPORT_SYMBOL(d_exact_alias); 2677EXPORT_SYMBOL(d_exact_alias);
2678 2678
2679/**
2680 * dentry_update_name_case - update case insensitive dentry with a new name
2681 * @dentry: dentry to be updated
2682 * @name: new name
2683 *
2684 * Update a case insensitive dentry with new case of name.
2685 *
2686 * dentry must have been returned by d_lookup with name @name. Old and new
2687 * name lengths must match (ie. no d_compare which allows mismatched name
2688 * lengths).
2689 *
2690 * Parent inode i_mutex must be held over d_lookup and into this call (to
2691 * keep renames and concurrent inserts, and readdir(2) away).
2692 */
2693void dentry_update_name_case(struct dentry *dentry, const struct qstr *name)
2694{
2695 BUG_ON(!inode_is_locked(dentry->d_parent->d_inode));
2696 BUG_ON(dentry->d_name.len != name->len); /* d_lookup gives this */
2697
2698 spin_lock(&dentry->d_lock);
2699 write_seqcount_begin(&dentry->d_seq);
2700 memcpy((unsigned char *)dentry->d_name.name, name->name, name->len);
2701 write_seqcount_end(&dentry->d_seq);
2702 spin_unlock(&dentry->d_lock);
2703}
2704EXPORT_SYMBOL(dentry_update_name_case);
2705
2706static void swap_names(struct dentry *dentry, struct dentry *target) 2679static void swap_names(struct dentry *dentry, struct dentry *target)
2707{ 2680{
2708 if (unlikely(dname_external(target))) { 2681 if (unlikely(dname_external(target))) {
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 66c6e17e61e5..cee70bf207fc 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -271,8 +271,6 @@ extern void d_rehash(struct dentry *);
271 271
272extern void d_add(struct dentry *, struct inode *); 272extern void d_add(struct dentry *, struct inode *);
273 273
274extern void dentry_update_name_case(struct dentry *, const struct qstr *);
275
276/* used for rename() and baskets */ 274/* used for rename() and baskets */
277extern void d_move(struct dentry *, struct dentry *); 275extern void d_move(struct dentry *, struct dentry *);
278extern void d_exchange(struct dentry *, struct dentry *); 276extern void d_exchange(struct dentry *, struct dentry *);