diff mbox series

[05/12] fs, net: Move read_descriptor_t to net.h

Message ID 20220330144930.315951-6-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series Additional patches for 5.18 | expand

Commit Message

Matthew Wilcox March 30, 2022, 2:49 p.m. UTC
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>
---
 include/linux/fs.h  | 19 -------------------
 include/linux/net.h | 19 +++++++++++++++++++
 2 files changed, 19 insertions(+), 19 deletions(-)

Comments

Christoph Hellwig March 30, 2022, 2:52 p.m. UTC | #1
On Wed, Mar 30, 2022 at 03:49:23PM +0100, Matthew Wilcox (Oracle) wrote:
> fs.h has no more need for this typedef; networking is now the sole user
> of the read_descriptor_t.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 7588d3a0ced8..8ff28939de60 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -338,25 +338,6 @@  static inline bool is_sync_kiocb(struct kiocb *kiocb)
 	return kiocb->ki_complete == NULL;
 }
 
-/*
- * "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 address_space_operations {
 	int (*writepage)(struct page *page, struct writeback_control *wbc);
 	int (*readpage)(struct file *, struct page *);
diff --git a/include/linux/net.h b/include/linux/net.h
index ba736b457a06..12093f4db50c 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;