- Timestamp:
- 10/14/08 19:36:32 (1 month ago)
- Files:
-
- 1 modified
-
Whitix/branches/keobject/fs/vfs/vnode.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/keobject/fs/vfs/vnode.c
r1081 r1131 86 86 87 87 if (err) 88 return err;88 goto out; 89 89 90 90 /* This is how mountpoints work. FIXME: Does every vNode need a mountNode? */ … … 104 104 } 105 105 106 out: 106 107 VNodeRelease(dir); 107 108 return err; … … 168 169 if (!c) 169 170 break; 171 172 currNode->refs++; 170 173 171 174 if (VfsDoLookup(currName, length, &newNode, currNode) || !(newNode->mode & VFS_ATTR_DIR)) 172 175 { 173 VNodeRelease(currNode); 176 // VNodeRelease(currNode); /* FIXME: Needed? currNode is released in VfsDoLookup */ 174 177 return NULL; 175 178 } … … 217 220 if (!dir) 218 221 return -ENOENT; 219 222 220 223 /* Now the directory vNode is known, create/open the file, according to what 221 224 the caller wants to do. */ … … 246 249 }else if (flags & FILE_CREATE_OPEN) 247 250 { 251 dir->refs++; 248 252 /* The file can either be created or opened */ 249 253 if (VfsDoLookup(name,nameLen,retVal,dir)) 250 254 { 251 255 /* Obviously doesn't exist, so create it */ 252 if (dir->vNodeOps ->create)256 if (dir->vNodeOps && dir->vNodeOps->create) 253 257 { 254 258 ret=dir->vNodeOps->create(retVal,dir,name,nameLen);
