aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/dcache.c29
-rw-r--r--fs/ncpfs/dir.c2
-rw-r--r--include/linux/fs.h1
3 files changed, 0 insertions, 32 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index b7f049c31526..b692c7e097c5 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2984,35 +2984,6 @@ void d_tmpfile(struct dentry *dentry, struct inode *inode)
2984} 2984}
2985EXPORT_SYMBOL(d_tmpfile); 2985EXPORT_SYMBOL(d_tmpfile);
2986 2986
2987/**
2988 * find_inode_number - check for dentry with name
2989 * @dir: directory to check
2990 * @name: Name to find.
2991 *
2992 * Check whether a dentry already exists for the given name,
2993 * and return the inode number if it has an inode. Otherwise
2994 * 0 is returned.
2995 *
2996 * This routine is used to post-process directory listings for
2997 * filesystems using synthetic inode numbers, and is necessary
2998 * to keep getcwd() working.
2999 */
3000
3001ino_t find_inode_number(struct dentry *dir, struct qstr *name)
3002{
3003 struct dentry * dentry;
3004 ino_t ino = 0;
3005
3006 dentry = d_hash_and_lookup(dir, name);
3007 if (!IS_ERR_OR_NULL(dentry)) {
3008 if (dentry->d_inode)
3009 ino = dentry->d_inode->i_ino;
3010 dput(dentry);
3011 }
3012 return ino;
3013}
3014EXPORT_SYMBOL(find_inode_number);
3015
3016static __initdata unsigned long dhash_entries; 2987static __initdata unsigned long dhash_entries;
3017static int __init set_dhash_entries(char *str) 2988static int __init set_dhash_entries(char *str)
3018{ 2989{
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c
index e5d488530580..3bc105d36f10 100644
--- a/fs/ncpfs/dir.c
+++ b/fs/ncpfs/dir.c
@@ -660,8 +660,6 @@ end_advance:
660 ctl.valid = 0; 660 ctl.valid = 0;
661 if (!ctl.filled && (ctl.fpos == ctx->pos)) { 661 if (!ctl.filled && (ctl.fpos == ctx->pos)) {
662 if (!ino) 662 if (!ino)
663 ino = find_inode_number(dentry, &qname);
664 if (!ino)
665 ino = iunique(dir->i_sb, 2); 663 ino = iunique(dir->i_sb, 2);
666 ctl.filled = !dir_emit(ctx, qname.name, qname.len, 664 ctl.filled = !dir_emit(ctx, qname.name, qname.len,
667 ino, DT_UNKNOWN); 665 ino, DT_UNKNOWN);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index ab11c44b0697..1db01c13ddce 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2311,7 +2311,6 @@ extern struct file * open_exec(const char *);
2311/* fs/dcache.c -- generic fs support functions */ 2311/* fs/dcache.c -- generic fs support functions */
2312extern int is_subdir(struct dentry *, struct dentry *); 2312extern int is_subdir(struct dentry *, struct dentry *);
2313extern int path_is_under(struct path *, struct path *); 2313extern int path_is_under(struct path *, struct path *);
2314extern ino_t find_inode_number(struct dentry *, struct qstr *);
2315 2314
2316#include <linux/err.h> 2315#include <linux/err.h>
2317 2316