From patchwork Fri Jun 30 13:23:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 9819635 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 541E3603F2 for ; Fri, 30 Jun 2017 13:24:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 457FB285EB for ; Fri, 30 Jun 2017 13:24:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A5C528660; Fri, 30 Jun 2017 13:24:58 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 E827E285EB for ; Fri, 30 Jun 2017 13:24:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752469AbdF3NYt (ORCPT ); Fri, 30 Jun 2017 09:24:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44604 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752434AbdF3NYq (ORCPT ); Fri, 30 Jun 2017 09:24:46 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C5DC531A35F; Fri, 30 Jun 2017 13:24:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C5DC531A35F Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=stefanha@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C5DC531A35F Received: from localhost (ovpn-116-222.ams2.redhat.com [10.36.116.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7AB888072B; Fri, 30 Jun 2017 13:24:38 +0000 (UTC) From: Stefan Hajnoczi To: linux-nfs@vger.kernel.org Cc: Abbas Naderi , Anna Schumaker , Trond Myklebust , "J. Bruce Fields" , Jeff Layton , Chuck Lever , Stefan Hajnoczi Subject: [PATCH v3 12/14] SUNRPC: add AF_VSOCK lock class Date: Fri, 30 Jun 2017 14:23:50 +0100 Message-Id: <20170630132352.32133-13-stefanha@redhat.com> In-Reply-To: <20170630132352.32133-1-stefanha@redhat.com> References: <20170630132352.32133-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 30 Jun 2017 13:24:41 +0000 (UTC) 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 Signed-off-by: Stefan Hajnoczi --- net/sunrpc/svcsock.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 0c09f3f..e67b097 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -78,8 +78,8 @@ static void svc_bc_sock_free(struct svc_xprt *xprt); #endif /* CONFIG_SUNRPC_BACKCHANNEL */ #ifdef CONFIG_DEBUG_LOCK_ALLOC -static struct lock_class_key svc_key[2]; -static struct lock_class_key svc_slock_key[2]; +static struct lock_class_key svc_key[3]; +static struct lock_class_key svc_slock_key[3]; static void svc_reclassify_socket(struct socket *sock) { @@ -103,6 +103,13 @@ static void svc_reclassify_socket(struct socket *sock) &svc_key[1]); break; + case AF_VSOCK: + sock_lock_init_class_and_name(sk, "slock-AF_VSOCK-NFSD", + &svc_slock_key[2], + "sk_xprt.xpt_lock-AF_VSOCK-NFSD", + &svc_key[2]); + break; + default: BUG(); }