From patchwork Thu Aug 16 19:24:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hefty, Sean" X-Patchwork-Id: 1334881 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id AC79440211 for ; Thu, 16 Aug 2012 19:24:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753137Ab2HPTY2 (ORCPT ); Thu, 16 Aug 2012 15:24:28 -0400 Received: from mga02.intel.com ([134.134.136.20]:37244 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753326Ab2HPTYZ convert rfc822-to-8bit (ORCPT ); Thu, 16 Aug 2012 15:24:25 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 16 Aug 2012 12:24:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.77,780,1336374000"; d="scan'208";a="181620515" Received: from orsmsx606.amr.corp.intel.com ([10.22.226.128]) by orsmga001.jf.intel.com with ESMTP; 16 Aug 2012 12:24:24 -0700 Received: from orsmsx105.amr.corp.intel.com (10.22.225.132) by orsmsx606.amr.corp.intel.com (10.22.226.128) with Microsoft SMTP Server (TLS) id 8.2.255.0; Thu, 16 Aug 2012 12:24:24 -0700 Received: from orsmsx101.amr.corp.intel.com ([169.254.8.152]) by ORSMSX105.amr.corp.intel.com ([169.254.4.178]) with mapi id 14.01.0355.002; Thu, 16 Aug 2012 12:24:24 -0700 From: "Hefty, Sean" To: "linux-rdma (linux-rdma@vger.kernel.org)" Subject: [PATCH 4/7] librdmacm/rspreload: Minor cleanup of fork_passive handling Thread-Topic: [PATCH 4/7] librdmacm/rspreload: Minor cleanup of fork_passive handling Thread-Index: Ac175FF3GnYtypbVTMCAgaRYsoZPTA== Date: Thu, 16 Aug 2012 19:24:23 +0000 Message-ID: <1828884A29C6694DAF28B7E6B8A8237346A8996E@ORSMSX101.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.139] MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Minor code cleanup in passive side handling of fork support. Signed-off-by: Sean Hefty --- src/preload.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/preload.c b/src/preload.c index b18d310..bb8e3fb 100644 --- a/src/preload.c +++ b/src/preload.c @@ -492,7 +492,7 @@ static void fork_passive(int socket) socklen_t len; uint32_t msg; - fd_get(socket, &sfd); + sfd = fd_getd(socket); len = sizeof sin6; ret = real.getsockname(sfd, (struct sockaddr *) &sin6, &len); @@ -510,7 +510,7 @@ static void fork_passive(int socket) lfd = rsocket(sin6.sin6_family, SOCK_STREAM, 0); if (lfd < 0) { - ret = lfd; + ret = lfd; goto sclose; } @@ -537,10 +537,7 @@ static void fork_passive(int socket) goto lclose; } - param = 1; - rsetsockopt(dfd, IPPROTO_TCP, TCP_NODELAY, ¶m, sizeof param); set_rsocket_options(dfd); - copysockopts(dfd, sfd, &rs, &real); real.shutdown(sfd, SHUT_RDWR); real.close(sfd);