summaryrefslogtreecommitdiffstats
path: root/fs/file.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-23 08:02:55 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-23 08:02:55 +0100
commitcbf580ff093861f021b31b2f8d0f03173fb58520 (patch)
tree948a7b6424e580979763c8576fee0bb7c326b0db /fs/file.c
parentdb1032f7e485ea95b83ad66bb3d1675ad66de77f (diff)
parent16fbf79b0f83bc752cee8589279f1ebfe57b3b6e (diff)
downloadlinux-cbf580ff093861f021b31b2f8d0f03173fb58520.tar.bz2
Merge 5.6-rc7 into tty-next
We need the tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/file.c')
-rw-r--r--fs/file.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/file.c b/fs/file.c
index a364e1a9b7e8..c8a4e4c86e55 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -540,9 +540,14 @@ static int alloc_fd(unsigned start, unsigned flags)
return __alloc_fd(current->files, start, rlimit(RLIMIT_NOFILE), flags);
}
+int __get_unused_fd_flags(unsigned flags, unsigned long nofile)
+{
+ return __alloc_fd(current->files, 0, nofile, flags);
+}
+
int get_unused_fd_flags(unsigned flags)
{
- return __alloc_fd(current->files, 0, rlimit(RLIMIT_NOFILE), flags);
+ return __get_unused_fd_flags(flags, rlimit(RLIMIT_NOFILE));
}
EXPORT_SYMBOL(get_unused_fd_flags);