From patchwork Wed May 31 08:30:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Coelho X-Patchwork-Id: 9756267 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 5B52460360 for ; Wed, 31 May 2017 08:30:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48722205A8 for ; Wed, 31 May 2017 08:30:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CF61283BD; Wed, 31 May 2017 08:30:37 +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 5EBAE205A8 for ; Wed, 31 May 2017 08:30:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751227AbdEaIab (ORCPT ); Wed, 31 May 2017 04:30:31 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:60104 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751192AbdEaIa3 (ORCPT ); Wed, 31 May 2017 04:30:29 -0400 Received: from a91-156-4-241.elisa-laajakaista.fi ([91.156.4.241] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.88) (envelope-from ) id 1dFz1J-0008Sn-4y; Wed, 31 May 2017 11:30:21 +0300 From: Luca Coelho To: johannes@sipsolutions.net Cc: backports@vger.kernel.org Date: Wed, 31 May 2017 11:30:10 +0300 Message-Id: <20170531083010.15135-1-luca@coelho.fi> X-Mailer: git-send-email 2.11.0 X-SA-Exim-Connect-IP: 91.156.4.241 X-SA-Exim-Mail-From: luca@coelho.fi Subject: [PATCH] backports: add lockdep_rtnl_is_held() for < 3.13 without CONFIG_PROVE_LOCKING X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on farmhouse.coelho.fi) Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Luca Coelho In kernels earlier than 3.13, lockdep_rtnl_is_held() is only declared in rtnetlink.h when CONFIG_PROVE_LOCKING is not set. Backport this function if that's the case. Signed-off-by: Luca Coelho --- backport/backport-include/linux/rtnetlink.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backport/backport-include/linux/rtnetlink.h b/backport/backport-include/linux/rtnetlink.h index 9b68be820049..59beffa8316a 100644 --- a/backport/backport-include/linux/rtnetlink.h +++ b/backport/backport-include/linux/rtnetlink.h @@ -18,4 +18,12 @@ ndo_dflt_fdb_add(ndm, tb, dev, addr, flags) #endif +#if LINUX_VERSION_IS_LESS(3,13,0) && \ + !defined(CONFIG_PROVE_LOCKING) +static inline bool lockdep_rtnl_is_held(void) +{ + return true; +} +#endif + #endif /* __BACKPORT_LINUX_RTNETLINK_H */