diff options
Diffstat (limited to 'include/linux/pipe_fs_i.h')
-rw-r--r-- | include/linux/pipe_fs_i.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index ec384958d509..123a7c24bc72 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -36,27 +36,19 @@ struct pipe_inode_info { | |||
36 | unsigned int w_counter; | 36 | unsigned int w_counter; |
37 | struct fasync_struct *fasync_readers; | 37 | struct fasync_struct *fasync_readers; |
38 | struct fasync_struct *fasync_writers; | 38 | struct fasync_struct *fasync_writers; |
39 | struct inode *inode; | ||
39 | }; | 40 | }; |
40 | 41 | ||
41 | /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual | 42 | /* Differs from PIPE_BUF in that PIPE_SIZE is the length of the actual |
42 | memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ | 43 | memory allocation, whereas PIPE_BUF makes atomicity guarantees. */ |
43 | #define PIPE_SIZE PAGE_SIZE | 44 | #define PIPE_SIZE PAGE_SIZE |
44 | 45 | ||
45 | #define PIPE_MUTEX(inode) (&(inode).i_mutex) | ||
46 | #define PIPE_WAIT(inode) (&(inode).i_pipe->wait) | ||
47 | #define PIPE_READERS(inode) ((inode).i_pipe->readers) | ||
48 | #define PIPE_WRITERS(inode) ((inode).i_pipe->writers) | ||
49 | #define PIPE_WAITING_WRITERS(inode) ((inode).i_pipe->waiting_writers) | ||
50 | #define PIPE_RCOUNTER(inode) ((inode).i_pipe->r_counter) | ||
51 | #define PIPE_WCOUNTER(inode) ((inode).i_pipe->w_counter) | ||
52 | #define PIPE_FASYNC_READERS(inode) (&((inode).i_pipe->fasync_readers)) | ||
53 | #define PIPE_FASYNC_WRITERS(inode) (&((inode).i_pipe->fasync_writers)) | ||
54 | |||
55 | /* Drop the inode semaphore and wait for a pipe event, atomically */ | 46 | /* Drop the inode semaphore and wait for a pipe event, atomically */ |
56 | void pipe_wait(struct inode * inode); | 47 | void pipe_wait(struct pipe_inode_info *pipe); |
57 | 48 | ||
58 | struct inode* pipe_new(struct inode* inode); | 49 | struct pipe_inode_info * alloc_pipe_info(struct inode * inode); |
59 | void free_pipe_info(struct inode* inode); | 50 | void free_pipe_info(struct inode * inode); |
51 | void __free_pipe_info(struct pipe_inode_info *); | ||
60 | 52 | ||
61 | /* | 53 | /* |
62 | * splice is tied to pipes as a transport (at least for now), so we'll just | 54 | * splice is tied to pipes as a transport (at least for now), so we'll just |