Skip to content

Commit

Permalink
fs, net: Move read_descriptor_t to net.h
Browse files Browse the repository at this point in the history
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) <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Al Viro <[email protected]>
Acked-by: Al Viro <[email protected]>
  • Loading branch information
Matthew Wilcox (Oracle) committed Apr 1, 2022
1 parent a9fcd89 commit b2403a6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
19 changes: 0 additions & 19 deletions include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down
19 changes: 19 additions & 0 deletions include/linux/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b2403a6

Please sign in to comment.