Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1785331imm; Wed, 16 May 2018 03:05:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZovf486Ov8Cu40BqJbMOrYAOuK0i+HcIQPI/B/TxuoCm8pWkS/gCGnw/G5ZjUvkuRnfwNLx X-Received: by 2002:a17:902:14d:: with SMTP id 71-v6mr218012plb.275.1526465128366; Wed, 16 May 2018 03:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526465128; cv=none; d=google.com; s=arc-20160816; b=l7iSkyXiIcs1ktZM4du2RMRPJo8XH1a9SG6dyR8JS4qtbKPItMEUtoLoMfQibrogRr LbrLRS50wv40633bipBst8oUeQ5dCENYrsGJDGvpjWcw6C0U074JfWDlj6B509Qqipw+ 5cRRjV5cBqbQlUiiM8BTHXsPY4+bB5CUog9NBboYk2BrGeViY9+tTGqE4KoIhWsFBBC+ OFxSH2ZSahxy/DW9GAxkES7uNn6AB5wvMVIS6Xdttl8mLq6iaUJYkGWrFqQUMqlkHfk0 bXq64Dj28O3w9gZ6YDGRgCCAiebxJwAaMpRdWq1XWloOl1Y6dPL6o0uYXhpjrDy+x8jB 5Gtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=0GJDPceBFANlSuzJjjMNdrs9rQcv0ykXgTB/FocL2Ug=; b=u26XFae5ZPvWCglCdnQW9T7FbyrL1mPpivWN9mz2YyWGI3l7uDefkcZdsbRw8HWf0C S0zGAp2NYeXbW+z8AmtqSQuK6bH0s0Kga+WU7FVCza80TS/IsKq/0EBLuIFsjDde6SBb w9x2oGpukG9FJ1+wrrcBEYgsNjwL4zCdqaUPXdaUvpv7rL0TJX2yjLkzVKxAVCTqNtu+ 34nnVNkSwu/E41miQ+li7XeFYK2/P8fEzZIAKNqTnVMYKbgxP/iFzR8kUuiaeRLIaokN a+7mQ03pvvRluq0NGB3vnOj1jzMxff5aHkHrx14cNSw3lwuFPdH3oLpZeQ5J0IjpHnLp 2zBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=t/ZxM/8+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12-v6si2167262plz.563.2018.05.16.03.05.14; Wed, 16 May 2018 03:05:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=t/ZxM/8+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752896AbeEPJpW (ORCPT + 99 others); Wed, 16 May 2018 05:45:22 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47466 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752378AbeEPJpR (ORCPT ); Wed, 16 May 2018 05:45:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0GJDPceBFANlSuzJjjMNdrs9rQcv0ykXgTB/FocL2Ug=; b=t/ZxM/8+k94cBN/Xo6HZ8aEQP b49VXp29rng3mybMX6vu+35BWwgRMYqU+IzOYvWjTRYPfYDJZ9tF/iwHZdUER7zKJBEYXiHTq1Zgq no886g3vCh5KyA5/z/WW49GuTnegwysi6ltYgTjTwzqAp4sDLNqzlF2CkZclAsneZOxntHDxGpl0E f0Hy1tNGL1ukTXgzWFYZYqdUJPjovOjcAhwO/SonAJGJ3q052JRNntvtulmSY88jrlaBwHZKUx5dI EnQ6b35/i5hlVxxIslYluKA+A6v66pNIQj4uI41nn/9/mvk4A1kh7c+yNBMMVL738IVfMVsSCwsNp ecIKLEdcQ==; Received: from 089144199016.atnat0008.highway.a1.net ([89.144.199.16] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIszT-0005Ri-UT; Wed, 16 May 2018 09:45:00 +0000 From: Christoph Hellwig To: Andrew Morton , Alexander Viro Cc: Alexey Dobriyan , Greg Kroah-Hartman , Jiri Slaby , Alessandro Zummo , Alexandre Belloni , linux-acpi@vger.kernel.org, drbd-dev@lists.linbit.com, linux-ide@vger.kernel.org, netdev@vger.kernel.org, linux-rtc@vger.kernel.org, megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, devel@driverdev.osuosl.org, linux-afs@lists.infradead.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/42] net: move seq_file_single_net to Date: Wed, 16 May 2018 11:43:20 +0200 Message-Id: <20180516094346.20506-17-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180516094346.20506-1-hch@lst.de> References: <20180516094346.20506-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This helper deals with single_{open,release}_net internals and thus belongs here. Signed-off-by: Christoph Hellwig --- include/linux/seq_file_net.h | 13 +++++++++++++ include/net/ip_vs.h | 12 ------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/include/linux/seq_file_net.h b/include/linux/seq_file_net.h index 43ccd84127b6..ed20faa99e05 100644 --- a/include/linux/seq_file_net.h +++ b/include/linux/seq_file_net.h @@ -28,4 +28,17 @@ static inline struct net *seq_file_net(struct seq_file *seq) #endif } +/* + * This one is needed for single_open_net since net is stored directly in + * private not as a struct i.e. seq_file_net can't be used. + */ +static inline struct net *seq_file_single_net(struct seq_file *seq) +{ +#ifdef CONFIG_NET_NS + return (struct net *)seq->private; +#else + return &init_net; +#endif +} + #endif diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index eb0bec043c96..aea7a124e66b 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -41,18 +41,6 @@ static inline struct netns_ipvs *net_ipvs(struct net* net) return net->ipvs; } -/* This one needed for single_open_net since net is stored directly in - * private not as a struct i.e. seq_file_net can't be used. - */ -static inline struct net *seq_file_single_net(struct seq_file *seq) -{ -#ifdef CONFIG_NET_NS - return (struct net *)seq->private; -#else - return &init_net; -#endif -} - /* Connections' size value needed by ip_vs_ctl.c */ extern int ip_vs_conn_tab_size; -- 2.17.0