Rootfs now starts with 1 for the first inode ID.
Instead of -1, vnode_path_to_vnode() now returns the ID of the starting vnode when it doesn't need to traverse the path at all. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14081 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -313,7 +313,7 @@ rootfs_mount(mount_id id, const char *device, uint32 flags, const char *args,
|
|||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
fs->id = id;
|
fs->id = id;
|
||||||
fs->next_vnode_id = 0;
|
fs->next_vnode_id = 1;
|
||||||
|
|
||||||
err = mutex_init(&fs->lock, "rootfs_mutex");
|
err = mutex_init(&fs->lock, "rootfs_mutex");
|
||||||
if (err < B_OK)
|
if (err < B_OK)
|
||||||
|
|||||||
@@ -1338,7 +1338,7 @@ vnode_path_to_vnode(struct vnode *vnode, char *path, bool traverseLeafLink,
|
|||||||
int count, struct vnode **_vnode, vnode_id *_parentID, int *_type)
|
int count, struct vnode **_vnode, vnode_id *_parentID, int *_type)
|
||||||
{
|
{
|
||||||
status_t status = 0;
|
status_t status = 0;
|
||||||
vnode_id lastParentID = -1;
|
vnode_id lastParentID = vnode->id;
|
||||||
int type = 0;
|
int type = 0;
|
||||||
|
|
||||||
FUNCTION(("vnode_path_to_vnode(vnode = %p, path = %s)\n", vnode, path));
|
FUNCTION(("vnode_path_to_vnode(vnode = %p, path = %s)\n", vnode, path));
|
||||||
|
|||||||
Reference in New Issue
Block a user