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:
parent
3f8b94d3cd
commit
e1481ffc45
@ -210,8 +210,8 @@ fd_dup2(int oldfd, int newfd, bool kernel)
|
|||||||
if (oldfd != newfd) {
|
if (oldfd != newfd) {
|
||||||
// Now do the work
|
// Now do the work
|
||||||
evicted = context->fds[newfd];
|
evicted = context->fds[newfd];
|
||||||
context->fds[newfd] = context->fds[oldfd];
|
|
||||||
atomic_add(&context->fds[oldfd]->ref_count, 1);
|
atomic_add(&context->fds[oldfd]->ref_count, 1);
|
||||||
|
context->fds[newfd] = context->fds[oldfd];
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_unlock(&context->io_mutex);
|
mutex_unlock(&context->io_mutex);
|
||||||
|
@ -256,6 +256,9 @@ add_vnode_to_mount_list(struct vnode *v, struct fs_mount *mount)
|
|||||||
|
|
||||||
v->mount_next = mount->vnodes_head;
|
v->mount_next = mount->vnodes_head;
|
||||||
v->mount_prev = NULL;
|
v->mount_prev = NULL;
|
||||||
|
if (v->mount_next)
|
||||||
|
v->mount_next->mount_prev = v;
|
||||||
|
|
||||||
mount->vnodes_head = v;
|
mount->vnodes_head = v;
|
||||||
if (!mount->vnodes_tail)
|
if (!mount->vnodes_tail)
|
||||||
mount->vnodes_tail = v;
|
mount->vnodes_tail = v;
|
||||||
|
Loading…
Reference in New Issue
Block a user