[PATCH 2/2] net: Remove fs.h from net.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We only need read_descriptor_t from fs.h, but the funny thing is that
fs.h doesn't need read_descriptor_t any more, so just move it to net.h.

Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
---
 Documentation/filesystems/locking.rst |  2 --
 include/linux/fs.h                    | 22 ----------------------
 include/linux/net.h                   | 21 ++++++++++++++++++++-
 3 files changed, 20 insertions(+), 25 deletions(-)

diff --git a/Documentation/filesystems/locking.rst b/Documentation/filesystems/locking.rst
index 1e894480115b..4f519d6efb73 100644
--- a/Documentation/filesystems/locking.rst
+++ b/Documentation/filesystems/locking.rst
@@ -522,8 +522,6 @@ prototypes::
 			loff_t *);
 	ssize_t (*writev) (struct file *, const struct iovec *, unsigned long,
 			loff_t *);
-	ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t,
-			void __user *);
 	ssize_t (*sendpage) (struct file *, struct page *, int, size_t,
 			loff_t *, int);
 	unsigned long (*get_unmapped_area)(struct file *, unsigned long,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index c3c88fdb9b2a..f2710ef476a4 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -345,28 +345,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;
-
-typedef int (*read_actor_t)(read_descriptor_t *, struct page *,
-		unsigned long, unsigned long);
-
 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 f54c8f478f3e..f6f9603a60bf 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -20,7 +20,6 @@
 #include <linux/fcntl.h>	/* For O_CLOEXEC and O_NONBLOCK */
 #include <linux/rcupdate.h>
 #include <linux/once.h>
-#include <linux/fs.h>
 #include <linux/page_ref.h>
 #include <linux/sockptr.h>
 
@@ -131,6 +130,26 @@ struct sockaddr;
 struct msghdr;
 struct module;
 struct sk_buff;
+
+/*
+ * "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 read_descriptor {
+	size_t written;
+	size_t count;
+	union {
+		char __user *buf;
+		void *data;
+	} arg;
+	int error;
+} read_descriptor_t;
+
 typedef int (*sk_read_actor_t)(read_descriptor_t *, struct sk_buff *,
 			       unsigned int, size_t);
 
-- 
2.30.2




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux