Don't check for fd limits in fdgrowtable_exp.
Callers do that already and additional check races with process decreasing limits and can result in not growing the table at all, which is currently not handled. MFC after: 3 days
This commit is contained in:
parent
d473bac729
commit
0918d4b21f
@ -1481,18 +1481,13 @@ filecaps_validate(const struct filecaps *fcaps, const char *func)
|
||||
static void
|
||||
fdgrowtable_exp(struct filedesc *fdp, int nfd)
|
||||
{
|
||||
int nfd1, maxfd;
|
||||
int nfd1;
|
||||
|
||||
FILEDESC_XLOCK_ASSERT(fdp);
|
||||
|
||||
nfd1 = fdp->fd_nfiles * 2;
|
||||
if (nfd1 < nfd)
|
||||
nfd1 = nfd;
|
||||
maxfd = getmaxfd(curproc);
|
||||
if (maxfd < nfd1)
|
||||
nfd1 = maxfd;
|
||||
KASSERT(nfd <= nfd1,
|
||||
("too low nfd1 %d %d %d %d", nfd, fdp->fd_nfiles, maxfd, nfd1));
|
||||
fdgrowtable(fdp, nfd1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user