]> git.karo-electronics.de Git - linux-beck.git/commitdiff
kill d_validate()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 25 Dec 2014 03:47:00 +0000 (22:47 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 26 Jan 2015 04:16:26 +0000 (23:16 -0500)
no users left

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

index e368d4f412f97ed11039e3329c77358b3fc1fea0..40432e59d72ec54dacdf5f6f96fb207ba2b15a2d 100644 (file)
@@ -2187,37 +2187,6 @@ struct dentry *d_hash_and_lookup(struct dentry *dir, struct qstr *name)
 }
 EXPORT_SYMBOL(d_hash_and_lookup);
 
-/**
- * d_validate - verify dentry provided from insecure source (deprecated)
- * @dentry: The dentry alleged to be valid child of @dparent
- * @dparent: The parent dentry (known to be valid)
- *
- * An insecure source has sent us a dentry, here we verify it and dget() it.
- * This is used by ncpfs in its readdir implementation.
- * Zero is returned in the dentry is invalid.
- *
- * This function is slow for big directories, and deprecated, do not use it.
- */
-int d_validate(struct dentry *dentry, struct dentry *dparent)
-{
-       struct dentry *child;
-
-       spin_lock(&dparent->d_lock);
-       list_for_each_entry(child, &dparent->d_subdirs, d_child) {
-               if (dentry == child) {
-                       spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
-                       __dget_dlock(dentry);
-                       spin_unlock(&dentry->d_lock);
-                       spin_unlock(&dparent->d_lock);
-                       return 1;
-               }
-       }
-       spin_unlock(&dparent->d_lock);
-
-       return 0;
-}
-EXPORT_SYMBOL(d_validate);
-
 /*
  * When a file is deleted, we have two options:
  * - turn this dentry into a negative dentry
index 5a813988e6d4736cab172b8dfe6000db1b4eb1c6..92c08cf7670e2afa128a1a15cd454b7f2398fbbf 100644 (file)
@@ -319,9 +319,6 @@ static inline unsigned d_count(const struct dentry *dentry)
        return dentry->d_lockref.count;
 }
 
-/* validate "insecure" dentry pointer */
-extern int d_validate(struct dentry *, struct dentry *);
-
 /*
  * helper function for dentry_operations.d_dname() members
  */