diff options
Diffstat (limited to 'fs/fcntl.c')
-rw-r--r-- | fs/fcntl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c index 97e01dc0d95f..452d02f9075e 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c | |||
@@ -344,7 +344,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg, | |||
344 | switch (cmd) { | 344 | switch (cmd) { |
345 | case F_DUPFD: | 345 | case F_DUPFD: |
346 | case F_DUPFD_CLOEXEC: | 346 | case F_DUPFD_CLOEXEC: |
347 | if (arg >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur) | 347 | if (arg >= rlimit(RLIMIT_NOFILE)) |
348 | break; | 348 | break; |
349 | err = alloc_fd(arg, cmd == F_DUPFD_CLOEXEC ? O_CLOEXEC : 0); | 349 | err = alloc_fd(arg, cmd == F_DUPFD_CLOEXEC ? O_CLOEXEC : 0); |
350 | if (err >= 0) { | 350 | if (err >= 0) { |