diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-06-15 01:55:58 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-06-15 01:55:58 +0000 |
commit | 53b3988d474435254a3b053a68bb24ce9e439295 (patch) | |
tree | f8da8e40f01f4ad02bbd76b8c9920749b118235f /fs/autofs | |
parent | b0cb48abe83d1a4389ea938bf624f8baa82c5047 (diff) |
Merge with 2.3.99-pre9.
Diffstat (limited to 'fs/autofs')
-rw-r--r-- | fs/autofs/dir.c | 27 | ||||
-rw-r--r-- | fs/autofs/dirhash.c | 4 |
2 files changed, 6 insertions, 25 deletions
diff --git a/fs/autofs/dir.c b/fs/autofs/dir.c index b71c3a819..9c114f1c2 100644 --- a/fs/autofs/dir.c +++ b/fs/autofs/dir.c @@ -12,29 +12,10 @@ #include "autofs_i.h" -static int autofs_dir_readdir(struct file *filp, - void *dirent, filldir_t filldir) -{ - struct inode *inode=filp->f_dentry->d_inode; - - switch((unsigned long) filp->f_pos) - { - case 0: - if (filldir(dirent, ".", 1, 0, inode->i_ino) < 0) - return 0; - filp->f_pos++; - /* fall through */ - case 1: - if (filldir(dirent, "..", 2, 1, AUTOFS_ROOT_INO) < 0) - return 0; - filp->f_pos++; - /* fall through */ - } - return 1; -} - /* - * No entries except for "." and "..", both of which are handled by the VFS layer + * No entries except for "." and "..", both of which are handled by the VFS + * layer. So all children are negative and dcache-based versions of operations + * are OK. */ static struct dentry *autofs_dir_lookup(struct inode *dir,struct dentry *dentry) { @@ -44,7 +25,7 @@ static struct dentry *autofs_dir_lookup(struct inode *dir,struct dentry *dentry) struct file_operations autofs_dir_operations = { read: generic_read_dir, - readdir: autofs_dir_readdir, + readdir: dcache_readdir, }; struct inode_operations autofs_dir_inode_operations = { diff --git a/fs/autofs/dirhash.c b/fs/autofs/dirhash.c index 168d7861b..448143fd0 100644 --- a/fs/autofs/dirhash.c +++ b/fs/autofs/dirhash.c @@ -133,8 +133,8 @@ void autofs_hash_insert(struct autofs_dirhash *dh, struct autofs_dir_ent *ent) autofs_say(ent->name,ent->len); autofs_init_usage(dh,ent); - if ( ent->dentry ) - ent->dentry->d_count++; + if (ent->dentry) + dget(ent->dentry); dhnp = &dh->h[(unsigned) ent->hash % AUTOFS_HASH_SIZE]; ent->next = *dhnp; |