From patchwork Tue Aug 30 00:03:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 9304661 X-Patchwork-Delegate: Trond.Myklebust@netapp.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9DCA06077C for ; Tue, 30 Aug 2016 00:04:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FD8C28970 for ; Tue, 30 Aug 2016 00:04:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74B51289E1; Tue, 30 Aug 2016 00:04:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1460F28970 for ; Tue, 30 Aug 2016 00:04:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757102AbcH3AEj (ORCPT ); Mon, 29 Aug 2016 20:04:39 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:34452 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755526AbcH3AEi (ORCPT ); Mon, 29 Aug 2016 20:04:38 -0400 Received: by mail-it0-f68.google.com with SMTP id e63so635106ith.1 for ; Mon, 29 Aug 2016 17:04:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=FPt6cCjJuq8W56BZ5qIqz0zVSDhnf4OotTpsoHL1pT8=; b=z27YHNFLDtbjrAlZtn2Z+quIrsrqw4dY3gg5plFNpBBRsZmJX8CRnJ/5YdlwNbSgxY SRbsBVIdBlF8GlRQ93tYcnHNFGvK6r0ppqBDTCLM+u8AT9Gs9wt/0cQf3syg6tgzR0XA lBFzDZCBSar1tdXmzLRxPDxVjdzi4KRgUQ4vZlGUdINghpnGKZuYdiVBvEvHlSq1+cgd +tIfXdIgbyYneBUXhZOWnMUTTKW9BZXDqbElzgk7Ln6z3dWnp/05Fg2WC5fA/uBW4JK+ JNOZlvS+w1N3p2TCj9GtYNFiZNHZ2woZRlcfc3rA5pq1qxIz6SL8dKwV7jPbvz7XeXNX hQLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=FPt6cCjJuq8W56BZ5qIqz0zVSDhnf4OotTpsoHL1pT8=; b=JJNL2samlH7L1/23wPz9889wnHWkcm71ZjwUAqM6HrnIFsQM6D9DAMymBOYRr3/J/w 3yrAdv7DSBsvbyAwmBu9NVwnKQYKzgQ6sJa3CEwv7Gz6+gyfxIFHCn2gN+aG8rIXLmU1 FqYWp2dDO8SdsYRWXaAEmB+jydv1rKn+k1rvCqrhVOjNx0uKbIxZuVJKeFYuDOE+PQtS ykZwU3u6ww/394YQg7udrGuPY4Z/DT7IAtj2llz5+9TurSBr2I4q5qxT1JbsBJhxSPlv lKuxBWdJl8opx5i3Pi895Tb6Fd8Hze2KrO+SJvw1N6ASzxsKNedOOTN3Frinzg46RYhA IchA== X-Gm-Message-State: AE9vXwNXYhgKz+HvxQpKIwJZOXC9JTBNuDt62Fap3TCeVFnzICiBSksXFjZvNqraJx4otQ== X-Received: by 10.36.91.213 with SMTP id g204mr2180637itb.42.1472515477395; Mon, 29 Aug 2016 17:04:37 -0700 (PDT) Received: from leira.trondhjem.org.localdomain (c-68-49-162-121.hsd1.mi.comcast.net. [68.49.162.121]) by smtp.gmail.com with ESMTPSA id 140sm7994943itl.4.2016.08.29.17.04.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Aug 2016 17:04:36 -0700 (PDT) From: Trond Myklebust To: linux-nfs@vger.kernel.org Subject: [PATCH 3/6] SUNRPC: Initialise struct svc_serv backchannel fields during __svc_create() Date: Mon, 29 Aug 2016 20:03:49 -0400 Message-Id: <1472515432-54202-4-git-send-email-trond.myklebust@primarydata.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472515432-54202-3-git-send-email-trond.myklebust@primarydata.com> References: <1472515432-54202-1-git-send-email-trond.myklebust@primarydata.com> <1472515432-54202-2-git-send-email-trond.myklebust@primarydata.com> <1472515432-54202-3-git-send-email-trond.myklebust@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clean up. Signed-off-by: Trond Myklebust --- fs/nfs/callback.c | 3 --- net/sunrpc/svc.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 478bb0a7effe..08e16f9b3333 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c @@ -147,9 +147,6 @@ nfs41_callback_up(struct svc_serv *serv) { struct svc_rqst *rqstp; - INIT_LIST_HEAD(&serv->sv_cb_list); - spin_lock_init(&serv->sv_cb_lock); - init_waitqueue_head(&serv->sv_cb_waitq); rqstp = svc_prepare_thread(serv, &serv->sv_pools[0], NUMA_NO_NODE); dprintk("--> %s return %d\n", __func__, PTR_ERR_OR_ZERO(rqstp)); return rqstp; diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index c5b0cb4f4056..7c8070ec93c8 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -401,6 +401,21 @@ int svc_bind(struct svc_serv *serv, struct net *net) } EXPORT_SYMBOL_GPL(svc_bind); +#if defined(CONFIG_SUNRPC_BACKCHANNEL) +static void +__svc_init_bc(struct svc_serv *serv) +{ + INIT_LIST_HEAD(&serv->sv_cb_list); + spin_lock_init(&serv->sv_cb_lock); + init_waitqueue_head(&serv->sv_cb_waitq); +} +#else +static void +__svc_init_bc(struct svc_serv *serv) +{ +} +#endif + /* * Create an RPC service */ @@ -443,6 +458,8 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools, init_timer(&serv->sv_temptimer); spin_lock_init(&serv->sv_lock); + __svc_init_bc(serv); + serv->sv_nrpools = npools; serv->sv_pools = kcalloc(serv->sv_nrpools, sizeof(struct svc_pool),