NFSD: Refactor socket creation out of __write_ports()