From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AB8JxZqTF7Uo/ATuo1UttE+XgzhQ0fzuRKx3FWnA+xqkKtn9U412/SfmjsGV19Ep3KPlLDaLRcbK ARC-Seal: i=1; a=rsa-sha256; t=1524671390; cv=none; d=google.com; s=arc-20160816; b=q6emSlN9dt7yyh6Y98datPRzRHSlCRnWt3+8UMso5ljoM7uF2ZL3wvt8glymGxJUkD ppTgUghRKk7KiADF3iFCjExI9LOY/ALS3E/dlp0/jE9hGp0NXV+NKJs05rsPMATd5ebD ewLHuF6ZRtRh6fa+LqMLY++oZ1Ni9ufpDgYxkHuc24C7G2tGShXv7g1bkhtZRo2WHmzo 52cJ25UY2devDRVVYMknzqBLeaQ8n+jFlVJ2p3jwf1GICM7/nQe1dJELboTOjeNay8yY BRK3VifjsiCi/+Wt2oFa0YL2/b0RZp9h7FSK2ZB2nQqoOYVcHKJHlDKeasMgwVe5xBd7 B2fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=0GJDPceBFANlSuzJjjMNdrs9rQcv0ykXgTB/FocL2Ug=; b=uR3KVAhQi3V6JQRnLsTseoOERpuMkgFN5AzmBtAfOVYTOhy2nDQZwzlebVi7kiGv1Y jHwbYNLW4Kilq3ssY3A9sHqWS+ogECAscFfYUz3BrwMLzaSFEot3JFV3ti51bzHuKC7h 3bqbwuhZBDEtBGLT8nsQB/gZxC33T921r6uY0kQ1vbJjcuTLXqladXGAdCzs5NNnZksk rRGfqN4iI23mUDFfxJYVQFoh0fo3M7aPzqkbnW43G4IFisArKnoWExRyLpesFEvt5Cjw Pi6YxUf+0pbkHphbMHQG9hRJBHOjTc5HqtELAcr1/Z/PS2b33MhLULwUB3L7f5rU1S2L N5eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=pJLIYZHJ; spf=pass (google.com: best guess record for domain of batv+8b59ddf2a3dd4691ec7e+5358+infradead.org+hch@bombadil.srs.infradead.org designates 198.137.202.133 as permitted sender) smtp.mailfrom=BATV+8b59ddf2a3dd4691ec7e+5358+infradead.org+hch@bombadil.srs.infradead.org Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=pJLIYZHJ; spf=pass (google.com: best guess record for domain of batv+8b59ddf2a3dd4691ec7e+5358+infradead.org+hch@bombadil.srs.infradead.org designates 198.137.202.133 as permitted sender) smtp.mailfrom=BATV+8b59ddf2a3dd4691ec7e+5358+infradead.org+hch@bombadil.srs.infradead.org 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 14/40] net: move seq_file_single_net to Date: Wed, 25 Apr 2018 17:48:01 +0200 Message-Id: <20180425154827.32251-15-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425154827.32251-1-hch@lst.de> References: <20180425154827.32251-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1598733828706268231?= X-GMAIL-MSGID: =?utf-8?q?1598733828706268231?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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