diff options
author | Eric Dumazet <edumazet@google.com> | 2023-03-16 01:10:13 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-03-17 08:52:06 +0000 |
commit | 61edf479818e63978cabd243b82ca80f8948a313 (patch) | |
tree | fefafc24a20f9a87bbafde35a1e60facc33af127 /net/packet/diag.c | |
parent | 50d935eafee292fc432d5ac8c8715a6492961abc (diff) | |
download | linux-61edf479818e63978cabd243b82ca80f8948a313.tar.gz linux-61edf479818e63978cabd243b82ca80f8948a313.tar.bz2 linux-61edf479818e63978cabd243b82ca80f8948a313.zip |
net/packet: convert po->running to an atomic flag
Instead of consuming 32 bits for po->running, use
one available bit in po->flags.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet/diag.c')
-rw-r--r-- | net/packet/diag.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/diag.c b/net/packet/diag.c index 56240aaf032b..de4ced5cf3e8 100644 --- a/net/packet/diag.c +++ b/net/packet/diag.c @@ -21,7 +21,7 @@ static int pdiag_put_info(const struct packet_sock *po, struct sk_buff *nlskb) pinfo.pdi_tstamp = READ_ONCE(po->tp_tstamp); pinfo.pdi_flags = 0; - if (po->running) + if (packet_sock_flag(po, PACKET_SOCK_RUNNING)) pinfo.pdi_flags |= PDI_RUNNING; if (packet_sock_flag(po, PACKET_SOCK_AUXDATA)) pinfo.pdi_flags |= PDI_AUXDATA; |