diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-03-01 21:35:06 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-03-14 05:16:33 +0100 |
commit | 9d95afd5971918b1aa8db1960ba24532c2d6ec89 (patch) | |
tree | cf6a14f2ced8ad73c955dd5d9700df4795f12060 | |
parent | ceph_fill_trace(): don't bother with d_instantiate(dn, NULL) (diff) | |
download | linux-9d95afd5971918b1aa8db1960ba24532c2d6ec89.tar.xz linux-9d95afd5971918b1aa8db1960ba24532c2d6ec89.zip |
kill dentry_unhash()
the last user is gone
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/namei.c | 25 | ||||
-rw-r--r-- | include/linux/fs.h | 5 |
2 files changed, 0 insertions, 30 deletions
diff --git a/fs/namei.c b/fs/namei.c index dbb8ec1a2006..794f81dce766 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3685,31 +3685,6 @@ SYSCALL_DEFINE2(mkdir, const char __user *, pathname, umode_t, mode) return sys_mkdirat(AT_FDCWD, pathname, mode); } -/* - * The dentry_unhash() helper will try to drop the dentry early: we - * should have a usage count of 1 if we're the only user of this - * dentry, and if that is true (possibly after pruning the dcache), - * then we drop the dentry now. - * - * A low-level filesystem can, if it choses, legally - * do a - * - * if (!d_unhashed(dentry)) - * return -EBUSY; - * - * if it cannot handle the case of removing a directory - * that is still in use by something else.. - */ -void dentry_unhash(struct dentry *dentry) -{ - shrink_dcache_parent(dentry); - spin_lock(&dentry->d_lock); - if (dentry->d_lockref.count == 1) - __d_drop(dentry); - spin_unlock(&dentry->d_lock); -} -EXPORT_SYMBOL(dentry_unhash); - int vfs_rmdir(struct inode *dir, struct dentry *dentry) { int error = may_delete(dir, dentry, 1); diff --git a/include/linux/fs.h b/include/linux/fs.h index ae681002100a..c577923cd400 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1540,11 +1540,6 @@ extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct de extern int vfs_whiteout(struct inode *, struct dentry *); /* - * VFS dentry helper functions. - */ -extern void dentry_unhash(struct dentry *dentry); - -/* * VFS file helper functions. */ extern void inode_init_owner(struct inode *inode, const struct inode *dir, |