kill dentry_unhash()
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 1 Mar 2016 20:35:06 +0000 (15:35 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 14 Mar 2016 04:16:33 +0000 (00:16 -0400)
the last user is gone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c
include/linux/fs.h

index dbb8ec1a2006b0829ab2181c6581e9aeb21d8909..794f81dce76606ec025e3dcf1f182a175eaa0e82 100644 (file)
@@ -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);
index ae681002100a1fb8401e934a99f40dedf039cd7d..c577923cd400d24951b8aa77b20e912a1e08f4f4 100644 (file)
@@ -1539,11 +1539,6 @@ extern int vfs_unlink(struct inode *, struct dentry *, struct inode **);
 extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *, struct inode **, unsigned int);
 extern int vfs_whiteout(struct inode *, struct dentry *);
 
-/*
- * VFS dentry helper functions.
- */
-extern void dentry_unhash(struct dentry *dentry);
-
 /*
  * VFS file helper functions.
  */