summaryrefslogtreecommitdiffstats
path: root/fs/file.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-11-19 17:02:14 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-11-19 17:02:14 +0900
commit80da549e5225c6f80d45f76ba2b3a4574ed278ae (patch)
tree59799c3d7b7d4a088abdfa3052c3682ed826ba7e /fs/file.c
parentf017eb299c3ac219215ce896718ea128ad9343eb (diff)
parentf4a75d2eb7b1e2206094b901be09adb31ba63681 (diff)
downloadop-kernel-dev-80da549e5225c6f80d45f76ba2b3a4574ed278ae.zip
op-kernel-dev-80da549e5225c6f80d45f76ba2b3a4574ed278ae.tar.gz
Merge tag 'v3.7-rc6' into asoc-wm2200
Linux 3.7-rc6
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 d3b5fa8..708d997 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);
OpenPOWER on IntegriCloud