Two fixes from NewOS (change 1606 & part of 1612) that made it into the

VFS.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@959 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2002-09-02 14:57:33 +00:00
parent 3f8b94d3cd
commit e1481ffc45
2 changed files with 4 additions and 1 deletions

View File

@ -210,8 +210,8 @@ fd_dup2(int oldfd, int newfd, bool kernel)
if (oldfd != newfd) {
// Now do the work
evicted = context->fds[newfd];
context->fds[newfd] = context->fds[oldfd];
atomic_add(&context->fds[oldfd]->ref_count, 1);
context->fds[newfd] = context->fds[oldfd];
}
mutex_unlock(&context->io_mutex);

View File

@ -256,6 +256,9 @@ add_vnode_to_mount_list(struct vnode *v, struct fs_mount *mount)
v->mount_next = mount->vnodes_head;
v->mount_prev = NULL;
if (v->mount_next)
v->mount_next->mount_prev = v;
mount->vnodes_head = v;
if (!mount->vnodes_tail)
mount->vnodes_tail = v;