growfd() grows enough for the desired fd
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 10 Sep 2014 21:54:15 +0000 (14:54 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 10 Sep 2014 21:58:57 +0000 (14:58 -0700)
commit8e1eed06a63d16f119a7beea114cea131ffe01b4
tree156bc11558323bf46f14a12255857fb83a1c76fb
parent11c7cacb654998bb34a84a91084e6cfbbcddc8ec
growfd() grows enough for the desired fd

Removing the hacky while loop, too.

This was bugging out if we asked for an FD > nfd + delta.  The
allocation wasn't big enough, and we'd fail.  9ns opens would fail if
there were too many VFS opens between 9ns opens (the VFS and 9ns share
an FD pool).
kern/src/ns/sysfile.c