Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29043
b: refs/heads/master
c: 6e66726
h: refs/heads/master
i:
  29041: caf64da
  29039: 451c43b
v: v3
  • Loading branch information
Prasanna Meda authored and Linus Torvalds committed Jun 23, 2006
1 parent 4d64cb2 commit 1ce4723
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 538c5902b81cc384e93ad3834b6d4a0b3fcb2285
refs/heads/master: 6e6672604773b9bae44d88d38afdf0763c104b1c
3 changes: 2 additions & 1 deletion trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ static struct files_struct *alloc_files(void)
/*
* Allocate a new files structure and copy contents from the
* passed in files structure.
* errorp will be valid only when the returned files_struct is NULL.
*/
static struct files_struct *dup_fd(struct files_struct *oldf, int *errorp)
{
Expand All @@ -633,6 +634,7 @@ static struct files_struct *dup_fd(struct files_struct *oldf, int *errorp)
int open_files, size, i, expand;
struct fdtable *old_fdt, *new_fdt;

*errorp = -ENOMEM;
newf = alloc_files();
if (!newf)
goto out;
Expand Down Expand Up @@ -746,7 +748,6 @@ static int copy_files(unsigned long clone_flags, struct task_struct * tsk)
* break this.
*/
tsk->files = NULL;
error = -ENOMEM;
newf = dup_fd(oldf, &error);
if (!newf)
goto out;
Expand Down

0 comments on commit 1ce4723

Please sign in to comment.