diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-01 20:51:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-01 20:51:54 -0400 |
commit | 20b4fb485227404329e41ad15588afad3df23050 (patch) | |
tree | f3e099f0ab3da8a93b447203e294d2bb22f6dc05 /include/linux/pipe_fs_i.h | |
parent | b9394d8a657cd3c064fa432aa0905c1b58b38fe9 (diff) | |
parent | ac3e3c5b1164397656df81b9e9ab4991184d3236 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS updates from Al Viro,
Misc cleanups all over the place, mainly wrt /proc interfaces (switch
create_proc_entry to proc_create(), get rid of the deprecated
create_proc_read_entry() in favor of using proc_create_data() and
seq_file etc).
7kloc removed.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
don't bother with deferred freeing of fdtables
proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
proc: Make the PROC_I() and PDE() macros internal to procfs
proc: Supply a function to remove a proc entry by PDE
take cgroup_open() and cpuset_open() to fs/proc/base.c
ppc: Clean up scanlog
ppc: Clean up rtas_flash driver somewhat
hostap: proc: Use remove_proc_subtree()
drm: proc: Use remove_proc_subtree()
drm: proc: Use minor->index to label things, not PDE->name
drm: Constify drm_proc_list[]
zoran: Don't print proc_dir_entry data in debug
reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
proc: Supply an accessor for getting the data from a PDE's parent
airo: Use remove_proc_subtree()
rtl8192u: Don't need to save device proc dir PDE
rtl8187se: Use a dir under /proc/net/r8180/
proc: Add proc_mkdir_data()
proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
proc: Move PDE_NET() to fs/proc/proc_net.c
...
Diffstat (limited to 'include/linux/pipe_fs_i.h')
-rw-r--r-- | include/linux/pipe_fs_i.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index ad1a427b5267..b8809fef61f5 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -27,6 +27,7 @@ struct pipe_buffer { | |||
27 | 27 | ||
28 | /** | 28 | /** |
29 | * struct pipe_inode_info - a linux kernel pipe | 29 | * struct pipe_inode_info - a linux kernel pipe |
30 | * @mutex: mutex protecting the whole thing | ||
30 | * @wait: reader/writer wait point in case of empty/full pipe | 31 | * @wait: reader/writer wait point in case of empty/full pipe |
31 | * @nrbufs: the number of non-empty pipe buffers in this pipe | 32 | * @nrbufs: the number of non-empty pipe buffers in this pipe |
32 | * @buffers: total number of buffers (should be a power of 2) | 33 | * @buffers: total number of buffers (should be a power of 2) |
@@ -34,26 +35,27 @@ struct pipe_buffer { | |||
34 | * @tmp_page: cached released page | 35 | * @tmp_page: cached released page |
35 | * @readers: number of current readers of this pipe | 36 | * @readers: number of current readers of this pipe |
36 | * @writers: number of current writers of this pipe | 37 | * @writers: number of current writers of this pipe |
38 | * @files: number of struct file refering this pipe (protected by ->i_lock) | ||
37 | * @waiting_writers: number of writers blocked waiting for room | 39 | * @waiting_writers: number of writers blocked waiting for room |
38 | * @r_counter: reader counter | 40 | * @r_counter: reader counter |
39 | * @w_counter: writer counter | 41 | * @w_counter: writer counter |
40 | * @fasync_readers: reader side fasync | 42 | * @fasync_readers: reader side fasync |
41 | * @fasync_writers: writer side fasync | 43 | * @fasync_writers: writer side fasync |
42 | * @inode: inode this pipe is attached to | ||
43 | * @bufs: the circular array of pipe buffers | 44 | * @bufs: the circular array of pipe buffers |
44 | **/ | 45 | **/ |
45 | struct pipe_inode_info { | 46 | struct pipe_inode_info { |
47 | struct mutex mutex; | ||
46 | wait_queue_head_t wait; | 48 | wait_queue_head_t wait; |
47 | unsigned int nrbufs, curbuf, buffers; | 49 | unsigned int nrbufs, curbuf, buffers; |
48 | unsigned int readers; | 50 | unsigned int readers; |
49 | unsigned int writers; | 51 | unsigned int writers; |
52 | unsigned int files; | ||
50 | unsigned int waiting_writers; | 53 | unsigned int waiting_writers; |
51 | unsigned int r_counter; | 54 | unsigned int r_counter; |
52 | unsigned int w_counter; | 55 | unsigned int w_counter; |
53 | struct page *tmp_page; | 56 | struct page *tmp_page; |
54 | struct fasync_struct *fasync_readers; | 57 | struct fasync_struct *fasync_readers; |
55 | struct fasync_struct *fasync_writers; | 58 | struct fasync_struct *fasync_writers; |
56 | struct inode *inode; | ||
57 | struct pipe_buffer *bufs; | 59 | struct pipe_buffer *bufs; |
58 | }; | 60 | }; |
59 | 61 | ||
@@ -144,9 +146,8 @@ int pipe_proc_fn(struct ctl_table *, int, void __user *, size_t *, loff_t *); | |||
144 | /* Drop the inode semaphore and wait for a pipe event, atomically */ | 146 | /* Drop the inode semaphore and wait for a pipe event, atomically */ |
145 | void pipe_wait(struct pipe_inode_info *pipe); | 147 | void pipe_wait(struct pipe_inode_info *pipe); |
146 | 148 | ||
147 | struct pipe_inode_info * alloc_pipe_info(struct inode * inode); | 149 | struct pipe_inode_info *alloc_pipe_info(void); |
148 | void free_pipe_info(struct inode * inode); | 150 | void free_pipe_info(struct pipe_inode_info *); |
149 | void __free_pipe_info(struct pipe_inode_info *); | ||
150 | 151 | ||
151 | /* Generic pipe buffer ops functions */ | 152 | /* Generic pipe buffer ops functions */ |
152 | void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int); | 153 | void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int); |