On Thu, 2016-12-22 at 16:26 -0500, Josef Bacik wrote: > In inet_csk_get_port we seem to be using smallest_port to figure out where the > best place to look for a SO_REUSEPORT sk that matches with an existing set of > SO_REUSEPORT's. However if we get to the logic > > if (smallest_size != -1) { > port = smallest_port; > goto have_port; > } > > we will do a useless search, because we would have already done the > inet_csk_bind_conflict for that port and it would have returned 1, otherwise > we > would have gone to found_tb and succeeded. Since this logic makes us do yet > another trip through inet_csk_bind_conflict for a port we know won't work just > delete this code and save us the time. > > Signed-off-by: Josef Bacik <jba...@fb.com>
Please remove tb->need_owners ;)