summaryrefslogtreecommitdiffstats
path: root/fs/file.c
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2012-11-05 15:58:32 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2012-11-05 15:58:32 +0100
commit3fd9396af83a1e69eaf9ebb573207431d8f265b6 (patch)
treef221f5777695de71ea97423c67438bca1746e26c /fs/file.c
parentarm64: Move PCI_IOBASE closer to MODULES_VADDR (diff)
parentLinux 3.7-rc4 (diff)
downloadlinux-3fd9396af83a1e69eaf9ebb573207431d8f265b6.tar.xz
linux-3fd9396af83a1e69eaf9ebb573207431d8f265b6.zip
Merge tag 'v3.7-rc4' into upstream-master
Linux 3.7-rc4
Diffstat (limited to 'fs/file.c')
-rw-r--r--fs/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/file.c b/fs/file.c
index d3b5fa80b71b..708d997a7748 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -900,7 +900,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
return __close_fd(files, fd);
if (fd >= rlimit(RLIMIT_NOFILE))
- return -EMFILE;
+ return -EBADF;
spin_lock(&files->file_lock);
err = expand_files(files, fd);
@@ -926,7 +926,7 @@ SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags)
return -EINVAL;
if (newfd >= rlimit(RLIMIT_NOFILE))
- return -EMFILE;
+ return -EBADF;
spin_lock(&files->file_lock);
err = expand_files(files, newfd);