Thread (51 messages) flat view 51 messages, 3 authors, 2018-01-10

Re: [PATCH 04/31] net: add support for ->poll_mask in proto_ops

From: Christoph Hellwig <hch@lst.de>
Date: 2018-01-08 10:48:48
Also in: linux-fsdevel, lkml

On Sat, Jan 06, 2018 at 07:16:22PM +0000, Al Viro wrote:
On Thu, Jan 04, 2018 at 09:00:16AM +0100, Christoph Hellwig wrote:
quoted
The socket file operations still implement ->poll until all protocols are
switched over.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/linux/net.h |  3 +++
 net/socket.c        | 61 +++++++++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 60 insertions(+), 4 deletions(-)
diff --git a/include/linux/net.h b/include/linux/net.h
index c2d468cb9821..94d65de30cb7 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -147,6 +147,9 @@ struct proto_ops {
 	int		(*getname)   (struct socket *sock,
 				      struct sockaddr *addr,
 				      int *sockaddr_len, int peer);
+	void		(*pre_poll)  (const struct sock *sk);
Description?  Or more descriptive name, for that matter...
One option might be to have the same get_poll_head semantics as
the file operation.  Which might actually be useful for the weird
things smc is doing, if they make any sense at all to start with.
quoted
+	__poll_t	(*poll_mask) (struct file *file, struct socket *sock,
+				      __poll_t events);
Does that sucker need struct file?
Not really.  Especially as we could get that from sock->file if needed.
I'll drop it for the next version.

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help