From: Kirill Tkhai <ktkhai@virtuozzo.com>
To: Tobias Klauser <tklauser@distanz.ch>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] unix: define and set show_fdinfo only if procfs is enabled
Date: Thu, 27 Feb 2020 11:50:24 +0300 [thread overview]
Message-ID: <6ac440dc-8300-2c19-d9a1-6b92c1cf8b84@virtuozzo.com> (raw)
In-Reply-To: <20200226172953.16471-1-tklauser@distanz.ch>
On 26.02.2020 20:29, Tobias Klauser wrote:
> Follow the pattern used with other *_show_fdinfo functions and only
> define unix_show_fdinfo and set it in proto_ops if CONFIG_PROCFS
> is set.
>
> Fixes: 3c32da19a858 ("unix: Show number of pending scm files of receive queue in fdinfo")
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> ---
> net/unix/af_unix.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> index 62c12cb5763e..aa6e2530e1ec 100644
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c
> @@ -682,6 +682,7 @@ static int unix_set_peek_off(struct sock *sk, int val)
> return 0;
> }
>
> +#ifdef CONFIG_PROCFS
> static void unix_show_fdinfo(struct seq_file *m, struct socket *sock)
> {
> struct sock *sk = sock->sk;
> @@ -692,6 +693,9 @@ static void unix_show_fdinfo(struct seq_file *m, struct socket *sock)
> seq_printf(m, "scm_fds: %u\n", READ_ONCE(u->scm_stat.nr_fds));
> }
> }
> +#else
> +#define unix_show_fdinfo NULL
> +#endif
>
> static const struct proto_ops unix_stream_ops = {
> .family = PF_UNIX,
>
next prev parent reply other threads:[~2020-02-27 8:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 17:29 [PATCH] unix: define and set show_fdinfo only if procfs is enabled Tobias Klauser
2020-02-27 8:50 ` Kirill Tkhai [this message]
2020-02-27 13:34 ` [PATCH net v1] " Tobias Klauser
2020-02-27 19:54 ` David Miller
2020-02-27 19:12 ` [PATCH] " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ac440dc-8300-2c19-d9a1-6b92c1cf8b84@virtuozzo.com \
--to=ktkhai@virtuozzo.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tklauser@distanz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.