aboutsummaryrefslogtreecommitdiffstats
path: root/fs/pipe.c
diff options
context:
space:
mode:
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-17 21:51:42 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-17 21:51:42 -0500
commitc58310bf4933986513020fa90b4190c7492995ae (patch)
tree143f2c7578d02ebef5db8fc57ae69e951ae0e2ee /fs/pipe.c
parent269cdfaf769f5cd831284cc831790c7c5038040f (diff)
parent1309d4e68497184d2fd87e892ddf14076c2bda98 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'fs/pipe.c')
-rw-r--r--fs/pipe.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/fs/pipe.c b/fs/pipe.c
index e66ec48e95d8..3c185b6527bc 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -171,7 +171,7 @@ static void anon_pipe_buf_release(struct pipe_inode_info *pipe,
171 * 171 *
172 * Description: 172 * Description:
173 * This function returns a kernel virtual address mapping for the 173 * This function returns a kernel virtual address mapping for the
174 * passed in @pipe_buffer. If @atomic is set, an atomic map is provided 174 * pipe_buffer passed in @buf. If @atomic is set, an atomic map is provided
175 * and the caller has to be careful not to fault before calling 175 * and the caller has to be careful not to fault before calling
176 * the unmap function. 176 * the unmap function.
177 * 177 *
@@ -208,15 +208,15 @@ void generic_pipe_buf_unmap(struct pipe_inode_info *pipe,
208} 208}
209 209
210/** 210/**
211 * generic_pipe_buf_steal - attempt to take ownership of a @pipe_buffer 211 * generic_pipe_buf_steal - attempt to take ownership of a &pipe_buffer
212 * @pipe: the pipe that the buffer belongs to 212 * @pipe: the pipe that the buffer belongs to
213 * @buf: the buffer to attempt to steal 213 * @buf: the buffer to attempt to steal
214 * 214 *
215 * Description: 215 * Description:
216 * This function attempts to steal the @struct page attached to 216 * This function attempts to steal the &struct page attached to
217 * @buf. If successful, this function returns 0 and returns with 217 * @buf. If successful, this function returns 0 and returns with
218 * the page locked. The caller may then reuse the page for whatever 218 * the page locked. The caller may then reuse the page for whatever
219 * he wishes, the typical use is insertion into a different file 219 * he wishes; the typical use is insertion into a different file
220 * page cache. 220 * page cache.
221 */ 221 */
222int generic_pipe_buf_steal(struct pipe_inode_info *pipe, 222int generic_pipe_buf_steal(struct pipe_inode_info *pipe,
@@ -238,7 +238,7 @@ int generic_pipe_buf_steal(struct pipe_inode_info *pipe,
238} 238}
239 239
240/** 240/**
241 * generic_pipe_buf_get - get a reference to a @struct pipe_buffer 241 * generic_pipe_buf_get - get a reference to a &struct pipe_buffer
242 * @pipe: the pipe that the buffer belongs to 242 * @pipe: the pipe that the buffer belongs to
243 * @buf: the buffer to get a reference to 243 * @buf: the buffer to get a reference to
244 * 244 *
@@ -576,9 +576,7 @@ bad_pipe_w(struct file *filp, const char __user *buf, size_t count,
576 return -EBADF; 576 return -EBADF;
577} 577}
578 578
579static int 579static long pipe_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
580pipe_ioctl(struct inode *pino, struct file *filp,
581 unsigned int cmd, unsigned long arg)
582{ 580{
583 struct inode *inode = filp->f_path.dentry->d_inode; 581 struct inode *inode = filp->f_path.dentry->d_inode;
584 struct pipe_inode_info *pipe; 582 struct pipe_inode_info *pipe;
@@ -785,7 +783,7 @@ const struct file_operations read_fifo_fops = {
785 .aio_read = pipe_read, 783 .aio_read = pipe_read,
786 .write = bad_pipe_w, 784 .write = bad_pipe_w,
787 .poll = pipe_poll, 785 .poll = pipe_poll,
788 .ioctl = pipe_ioctl, 786 .unlocked_ioctl = pipe_ioctl,
789 .open = pipe_read_open, 787 .open = pipe_read_open,
790 .release = pipe_read_release, 788 .release = pipe_read_release,
791 .fasync = pipe_read_fasync, 789 .fasync = pipe_read_fasync,
@@ -797,7 +795,7 @@ const struct file_operations write_fifo_fops = {
797 .write = do_sync_write, 795 .write = do_sync_write,
798 .aio_write = pipe_write, 796 .aio_write = pipe_write,
799 .poll = pipe_poll, 797 .poll = pipe_poll,
800 .ioctl = pipe_ioctl, 798 .unlocked_ioctl = pipe_ioctl,
801 .open = pipe_write_open, 799 .open = pipe_write_open,
802 .release = pipe_write_release, 800 .release = pipe_write_release,
803 .fasync = pipe_write_fasync, 801 .fasync = pipe_write_fasync,
@@ -810,7 +808,7 @@ const struct file_operations rdwr_fifo_fops = {
810 .write = do_sync_write, 808 .write = do_sync_write,
811 .aio_write = pipe_write, 809 .aio_write = pipe_write,
812 .poll = pipe_poll, 810 .poll = pipe_poll,
813 .ioctl = pipe_ioctl, 811 .unlocked_ioctl = pipe_ioctl,
814 .open = pipe_rdwr_open, 812 .open = pipe_rdwr_open,
815 .release = pipe_rdwr_release, 813 .release = pipe_rdwr_release,
816 .fasync = pipe_rdwr_fasync, 814 .fasync = pipe_rdwr_fasync,
@@ -822,7 +820,7 @@ static const struct file_operations read_pipe_fops = {
822 .aio_read = pipe_read, 820 .aio_read = pipe_read,
823 .write = bad_pipe_w, 821 .write = bad_pipe_w,
824 .poll = pipe_poll, 822 .poll = pipe_poll,
825 .ioctl = pipe_ioctl, 823 .unlocked_ioctl = pipe_ioctl,
826 .open = pipe_read_open, 824 .open = pipe_read_open,
827 .release = pipe_read_release, 825 .release = pipe_read_release,
828 .fasync = pipe_read_fasync, 826 .fasync = pipe_read_fasync,
@@ -834,7 +832,7 @@ static const struct file_operations write_pipe_fops = {
834 .write = do_sync_write, 832 .write = do_sync_write,
835 .aio_write = pipe_write, 833 .aio_write = pipe_write,
836 .poll = pipe_poll, 834 .poll = pipe_poll,
837 .ioctl = pipe_ioctl, 835 .unlocked_ioctl = pipe_ioctl,
838 .open = pipe_write_open, 836 .open = pipe_write_open,
839 .release = pipe_write_release, 837 .release = pipe_write_release,
840 .fasync = pipe_write_fasync, 838 .fasync = pipe_write_fasync,
@@ -847,7 +845,7 @@ static const struct file_operations rdwr_pipe_fops = {
847 .write = do_sync_write, 845 .write = do_sync_write,
848 .aio_write = pipe_write, 846 .aio_write = pipe_write,
849 .poll = pipe_poll, 847 .poll = pipe_poll,
850 .ioctl = pipe_ioctl, 848 .unlocked_ioctl = pipe_ioctl,
851 .open = pipe_rdwr_open, 849 .open = pipe_rdwr_open,
852 .release = pipe_rdwr_release, 850 .release = pipe_rdwr_release,
853 .fasync = pipe_rdwr_fasync, 851 .fasync = pipe_rdwr_fasync,