Skip to content

Commit b2403a6

Browse files
author
Matthew Wilcox (Oracle)
committed
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>
1 parent a9fcd89 commit b2403a6

2 files changed

Lines changed: 19 additions & 19 deletions

File tree

include/linux/fs.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -338,25 +338,6 @@ static inline bool is_sync_kiocb(struct kiocb *kiocb)
338338
return kiocb->ki_complete == NULL;
339339
}
340340

341-
/*
342-
* "descriptor" for what we're up to with a read.
343-
* This allows us to use the same read code yet
344-
* have multiple different users of the data that
345-
* we read from a file.
346-
*
347-
* The simplest case just copies the data to user
348-
* mode.
349-
*/
350-
typedef struct {
351-
size_t written;
352-
size_t count;
353-
union {
354-
char __user *buf;
355-
void *data;
356-
} arg;
357-
int error;
358-
} read_descriptor_t;
359-
360341
struct address_space_operations {
361342
int (*writepage)(struct page *page, struct writeback_control *wbc);
362343
int (*readpage)(struct file *, struct page *);

include/linux/net.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,25 @@ struct socket {
125125
struct socket_wq wq;
126126
};
127127

128+
/*
129+
* "descriptor" for what we're up to with a read.
130+
* This allows us to use the same read code yet
131+
* have multiple different users of the data that
132+
* we read from a file.
133+
*
134+
* The simplest case just copies the data to user
135+
* mode.
136+
*/
137+
typedef struct {
138+
size_t written;
139+
size_t count;
140+
union {
141+
char __user *buf;
142+
void *data;
143+
} arg;
144+
int error;
145+
} read_descriptor_t;
146+
128147
struct vm_area_struct;
129148
struct page;
130149
struct sockaddr;

0 commit comments

Comments
 (0)