diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-04 15:09:01 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-11-09 05:16:21 (GMT) |
commit | b61625d24596ea44555943867d5a5c1efd81074c (patch) | |
tree | 2cfccb7343ffac47aaa3b95b7354b34cece811d2 /fs/dcache.c | |
parent | eee5cc2702929fd41cce28058dc6d6717f723f87 (diff) | |
download | linux-fsl-qoriq-b61625d24596ea44555943867d5a5c1efd81074c.tar.xz |
fold __d_shrink() into its only remaining caller
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index aafa2a1..fb7bcf3 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -483,27 +483,6 @@ static struct dentry *d_kill(struct dentry *dentry, struct dentry *parent) return parent; } -/* - * Unhash a dentry without inserting an RCU walk barrier or checking that - * dentry->d_lock is locked. The caller must take care of that, if - * appropriate. - */ -static void __d_shrink(struct dentry *dentry) -{ - if (!d_unhashed(dentry)) { - struct hlist_bl_head *b; - if (unlikely(dentry->d_flags & DCACHE_DISCONNECTED)) - b = &dentry->d_sb->s_anon; - else - b = d_hash(dentry->d_parent, dentry->d_name.hash); - - hlist_bl_lock(b); - __hlist_bl_del(&dentry->d_hash); - dentry->d_hash.pprev = NULL; - hlist_bl_unlock(b); - } -} - /** * d_drop - drop a dentry * @dentry: dentry to drop @@ -522,7 +501,16 @@ static void __d_shrink(struct dentry *dentry) void __d_drop(struct dentry *dentry) { if (!d_unhashed(dentry)) { - __d_shrink(dentry); + struct hlist_bl_head *b; + if (unlikely(dentry->d_flags & DCACHE_DISCONNECTED)) + b = &dentry->d_sb->s_anon; + else + b = d_hash(dentry->d_parent, dentry->d_name.hash); + + hlist_bl_lock(b); + __hlist_bl_del(&dentry->d_hash); + dentry->d_hash.pprev = NULL; + hlist_bl_unlock(b); dentry_rcuwalk_barrier(dentry); } } |