summaryrefslogtreecommitdiff
path: root/fatfs/inode.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2003-05-10 00:12:29 +0000
committerMarcus Brinkmann <marcus@gnu.org>2003-05-10 00:12:29 +0000
commite1a049e27ae81f2eac0d59fbdd221710ec2d8ab5 (patch)
tree7d4fc7257b6677fc3e5cd3c11b29edd4486e2242 /fatfs/inode.c
parent8e833469cbe0f6f2ba26d23f7e11540a75071e9d (diff)
2003-04-26 Marco Gerards <metgerards@student.han.nl>
* dir.c (diskfs_get_directs): Consider ENTRY when adding "." and ".." for the rootnode. * inode.c (read_node): Use ifind instead of diskfs_cached_lookup and do not use diskfs_nput anymore. * main.c (diskfs_S_fsys_getfile): New function.
Diffstat (limited to 'fatfs/inode.c')
-rw-r--r--fatfs/inode.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/fatfs/inode.c b/fatfs/inode.c
index 4119551a..50f8662b 100644
--- a/fatfs/inode.c
+++ b/fatfs/inode.c
@@ -1,5 +1,5 @@
/* inode.c - Inode management routines.
- Copyright (C) 1994,95,96,97,98,99, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1994,95,96,97,98,99,2000,02,03 Free Software Foundation, Inc.
Modified for fatfs by Marcus Brinkmann <marcus@gnu.org>
This file is part of the GNU Hurd.
@@ -273,18 +273,16 @@ read_node (struct node *np, vm_address_t buf)
{
if (buf == 0)
{
- err = diskfs_cached_lookup (vk.dir_inode, &dp);
- if (err)
- return err;
+ /* FIXME: We know intimately that the parent dir is locked
+ by libdiskfs. The only case it is not locked is for NFS
+ (fsys_getfile) and we disabled that. */
+ dp = ifind (vk.dir_inode);
/* Map in the directory contents. */
memobj = diskfs_get_filemap (dp, prot);
if (memobj == MACH_PORT_NULL)
- {
- diskfs_nput (dp);
- return errno;
- }
+ return errno;
buflen = round_page (dp->dn_stat.st_size);
err = vm_map (mach_task_self (),
@@ -347,8 +345,6 @@ read_node (struct node *np, vm_address_t buf)
{
if (our_buf && buf)
munmap ((caddr_t) buf, buflen);
- if (dp)
- diskfs_nput (dp);
return err;
}
st->st_size = np->allocsize;
@@ -384,8 +380,6 @@ read_node (struct node *np, vm_address_t buf)
if (our_buf && buf)
munmap ((caddr_t) buf, buflen);
- if (dp)
- diskfs_nput (dp);
return 0;
}