aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2021-11-01 07:10:30 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-11-01 07:10:30 -0300
commit875eaa399042064c4ba08a56919f12ade8ea6cb9 (patch)
tree34c754e6174795aee4830e9363af47217ebbd475 /include/net/sock.h
parentperf test sample-parsing: Add endian test for struct branch_flags (diff)
parentLinux 5.15 (diff)
downloadlinux-875eaa399042064c4ba08a56919f12ade8ea6cb9.tar.gz
linux-875eaa399042064c4ba08a56919f12ade8ea6cb9.zip
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index ea6fbc88c8f9..463f390d90b3 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1208,7 +1208,7 @@ struct proto {
#endif
bool (*stream_memory_free)(const struct sock *sk, int wake);
- bool (*stream_memory_read)(const struct sock *sk);
+ bool (*sock_is_readable)(struct sock *sk);
/* Memory pressure */
void (*enter_memory_pressure)(struct sock *sk);
void (*leave_memory_pressure)(struct sock *sk);
@@ -2820,4 +2820,10 @@ void sock_set_sndtimeo(struct sock *sk, s64 secs);
int sock_bind_add(struct sock *sk, struct sockaddr *addr, int addr_len);
+static inline bool sk_is_readable(struct sock *sk)
+{
+ if (sk->sk_prot->sock_is_readable)
+ return sk->sk_prot->sock_is_readable(sk);
+ return false;
+}
#endif /* _SOCK_H */