diff options
-rw-r--r-- | fs/dcache.c | 29 | ||||
-rw-r--r-- | fs/ncpfs/dir.c | 2 | ||||
-rw-r--r-- | include/linux/fs.h | 1 |
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 | } |
2985 | EXPORT_SYMBOL(d_tmpfile); | 2985 | EXPORT_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 | |||
3001 | ino_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 | } | ||
3014 | EXPORT_SYMBOL(find_inode_number); | ||
3015 | |||
3016 | static __initdata unsigned long dhash_entries; | 2987 | static __initdata unsigned long dhash_entries; |
3017 | static int __init set_dhash_entries(char *str) | 2988 | static 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 */ |
2312 | extern int is_subdir(struct dentry *, struct dentry *); | 2312 | extern int is_subdir(struct dentry *, struct dentry *); |
2313 | extern int path_is_under(struct path *, struct path *); | 2313 | extern int path_is_under(struct path *, struct path *); |
2314 | extern ino_t find_inode_number(struct dentry *, struct qstr *); | ||
2315 | 2314 | ||
2316 | #include <linux/err.h> | 2315 | #include <linux/err.h> |
2317 | 2316 | ||