aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/net.h
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-02-14 09:15:34 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-04-01 14:40:44 -0400
commitb2403a61308533c576c9dd783fcb73a9186e0b37 (patch)
tree50b2675eb043f34d5bc5e0abfd687ef06c396d06 /include/linux/net.h
parenta9fcd89d67bb8c4ad613b54ab691fc603c94a03a (diff)
downloadlinux-b2403a61308533c576c9dd783fcb73a9186e0b37.tar.gz
fs, net: Move read_descriptor_t to net.h
fs.h has no more need for this typedef; networking is now the sole user of the read_descriptor_t. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/net.h')
-rw-r--r--include/linux/net.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/net.h b/include/linux/net.h
index ba736b457a068..12093f4db50c4 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -125,6 +125,25 @@ struct socket {
struct socket_wq wq;
};
+/*
+ * "descriptor" for what we're up to with a read.
+ * This allows us to use the same read code yet
+ * have multiple different users of the data that
+ * we read from a file.
+ *
+ * The simplest case just copies the data to user
+ * mode.
+ */
+typedef struct {
+ size_t written;
+ size_t count;
+ union {
+ char __user *buf;
+ void *data;
+ } arg;
+ int error;
+} read_descriptor_t;
+
struct vm_area_struct;
struct page;
struct sockaddr;