diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:16:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:16:15 +0000 |
commit | b5d465a24babe0dbb7438a7ef28eb29a933de302 (patch) | |
tree | 7a1e797d75fc2668c2bead5c19f93e472d57a5e1 /fs/file.c | |
parent | Releasing progress-linux version 6.9.10-1~progress7.99u1. (diff) | |
download | linux-b5d465a24babe0dbb7438a7ef28eb29a933de302.tar.xz linux-b5d465a24babe0dbb7438a7ef28eb29a933de302.zip |
Merging upstream version 6.9.11.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fs/file.c')
-rw-r--r-- | fs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -481,12 +481,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; |