mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 09:34:12 +08:00
net: use sock_valbool_flag() only in __sock_set_timestamps()
sock_{,re}set_flag() are contained in sock_valbool_flag(), it would be cleaner to just use sock_valbool_flag(). Signed-off-by: Yajun Deng <yajun.deng@linux.dev> Link: https://patch.msgid.link/20241017133435.2552-1-yajun.deng@linux.dev Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
1a629afd59
commit
6886c14bdc
@ -820,14 +820,11 @@ EXPORT_SYMBOL(sock_set_sndtimeo);
|
||||
|
||||
static void __sock_set_timestamps(struct sock *sk, bool val, bool new, bool ns)
|
||||
{
|
||||
sock_valbool_flag(sk, SOCK_RCVTSTAMP, val);
|
||||
sock_valbool_flag(sk, SOCK_RCVTSTAMPNS, val && ns);
|
||||
if (val) {
|
||||
sock_valbool_flag(sk, SOCK_TSTAMP_NEW, new);
|
||||
sock_valbool_flag(sk, SOCK_RCVTSTAMPNS, ns);
|
||||
sock_set_flag(sk, SOCK_RCVTSTAMP);
|
||||
sock_enable_timestamp(sk, SOCK_TIMESTAMP);
|
||||
} else {
|
||||
sock_reset_flag(sk, SOCK_RCVTSTAMP);
|
||||
sock_reset_flag(sk, SOCK_RCVTSTAMPNS);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user