summaryrefslogtreecommitdiffstats
path: root/fs/fcntl.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-25 05:30:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-25 05:30:00 +0000
commitee355114ec6062d00c1376b184b886a39e74fd4e (patch)
treeda9330872894208b121ac18e2abbc801b67f1509 /fs/fcntl.c
parentd1003cbd87479d4962fe017c0f913dde9c4d026a (diff)
Merge with Linux 2.4.0-test6-pre9.
Diffstat (limited to 'fs/fcntl.c')
-rw-r--r--fs/fcntl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 659821873..35a5dbc7d 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -132,7 +132,7 @@ asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd)
struct file * file;
struct files_struct * files = current->files;
- write_lock(&current->files->file_lock);
+ write_lock(&files->file_lock);
if (!(file = fcheck(oldfd)))
goto out_unlock;
err = newfd;
@@ -158,7 +158,7 @@ asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd)
FD_SET(newfd, files->open_fds);
write_unlock(&files->file_lock);
- do_close(newfd, 0);
+ do_close(files, newfd, 0);
write_lock(&files->file_lock);
allocate_fd(files, file, newfd);
@@ -167,7 +167,7 @@ asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd)
out:
return err;
out_unlock:
- write_unlock(&current->files->file_lock);
+ write_unlock(&files->file_lock);
goto out;
}