diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-06-13 13:13:38 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-06-13 13:13:46 -0700 |
commit | 4c7d3d79c736186bb2585f2d0a8231e1fac839da (patch) | |
tree | 5abd973d57d360e24c9df2f17e942176ab2faaa5 /fs/file.c | |
parent | 3ec8d7572a69d142d49f52b28ce8d84e5fef9131 (diff) | |
parent | d20f6b3d747c36889b7ce75ee369182af3decb6b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
No conflicts, no adjacent changes.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'fs/file.c')
-rw-r--r-- | fs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/file.c b/fs/file.c index 8076aef9c210..a3b72aa64f11 100644 --- a/fs/file.c +++ b/fs/file.c @@ -486,12 +486,12 @@ struct files_struct init_files = { static unsigned int find_next_fd(struct fdtable *fdt, unsigned int start) { - unsigned int maxfd = fdt->max_fds; + unsigned int maxfd = fdt->max_fds; /* always multiple of BITS_PER_LONG */ unsigned int maxbit = maxfd / BITS_PER_LONG; unsigned int bitbit = start / BITS_PER_LONG; bitbit = find_next_zero_bit(fdt->full_fds_bits, maxbit, bitbit) * BITS_PER_LONG; - if (bitbit > maxfd) + if (bitbit >= maxfd) return maxfd; if (bitbit > start) start = bitbit; |