All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] net: Remove mm.h from net.h
@ 2021-06-21 16:49 Matthew Wilcox (Oracle)
  2021-06-21 16:49 ` [PATCH 2/2] net: Remove fs.h " Matthew Wilcox (Oracle)
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox (Oracle) @ 2021-06-21 16:49 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, netdev
  Cc: Matthew Wilcox (Oracle), linux-fsdevel, linux-kernel, Alexander Viro

We only need page_ref.h here (which provides page_count() directly
and PageSlab() by pulling in page-flags.h)

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 include/linux/net.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/net.h b/include/linux/net.h
index ba736b457a06..f54c8f478f3e 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -21,7 +21,7 @@
 #include <linux/rcupdate.h>
 #include <linux/once.h>
 #include <linux/fs.h>
-#include <linux/mm.h>
+#include <linux/page_ref.h>
 #include <linux/sockptr.h>
 
 #include <uapi/linux/net.h>
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] net: Remove fs.h from net.h
  2021-06-21 16:49 [PATCH 1/2] net: Remove mm.h from net.h Matthew Wilcox (Oracle)
@ 2021-06-21 16:49 ` Matthew Wilcox (Oracle)
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Wilcox (Oracle) @ 2021-06-21 16:49 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, netdev
  Cc: Matthew Wilcox (Oracle), linux-fsdevel, linux-kernel, Alexander Viro

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@infradead.org>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-21 17:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 16:49 [PATCH 1/2] net: Remove mm.h from net.h Matthew Wilcox (Oracle)
2021-06-21 16:49 ` [PATCH 2/2] net: Remove fs.h " Matthew Wilcox (Oracle)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.