aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-21 11:01:38 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 14:13:01 -0400
commit6447a3cf19da8c4653283d1c491e2e775633f348 (patch)
tree9fda0088125df81c816b5cce416e5d010c9de498 /fs
parentebec73f4752b777b79b384bd52e5240203cb9b00 (diff)
get rid of pipe->inode
it's used only as a flag to distinguish normal pipes/FIFOs from the internal per-task one used by file-to-file splice. And pipe->files would work just as well for that purpose... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/fuse/dev.c2
-rw-r--r--fs/pipe.c5
-rw-r--r--fs/splice.c4
3 files changed, 5 insertions, 6 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 11dfa0c3fb46..9bfd1a3214e6 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1319,7 +1319,7 @@ static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos,
1319 page_nr++; 1319 page_nr++;
1320 ret += buf->len; 1320 ret += buf->len;
1321 1321
1322 if (pipe->inode) 1322 if (pipe->files)
1323 do_wakeup = 1; 1323 do_wakeup = 1;
1324 } 1324 }
1325 1325
diff --git a/fs/pipe.c b/fs/pipe.c
index e2fc5ccb0d49..39bdec06fe2b 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -55,7 +55,7 @@ unsigned int pipe_min_size = PAGE_SIZE;
55 55
56static void pipe_lock_nested(struct pipe_inode_info *pipe, int subclass) 56static void pipe_lock_nested(struct pipe_inode_info *pipe, int subclass)
57{ 57{
58 if (pipe->inode) 58 if (pipe->files)
59 mutex_lock_nested(&pipe->mutex, subclass); 59 mutex_lock_nested(&pipe->mutex, subclass);
60} 60}
61 61
@@ -70,7 +70,7 @@ EXPORT_SYMBOL(pipe_lock);
70 70
71void pipe_unlock(struct pipe_inode_info *pipe) 71void pipe_unlock(struct pipe_inode_info *pipe)
72{ 72{
73 if (pipe->inode) 73 if (pipe->files)
74 mutex_unlock(&pipe->mutex); 74 mutex_unlock(&pipe->mutex);
75} 75}
76EXPORT_SYMBOL(pipe_unlock); 76EXPORT_SYMBOL(pipe_unlock);
@@ -785,7 +785,6 @@ struct pipe_inode_info * alloc_pipe_info(struct inode *inode)
785 if (pipe->bufs) { 785 if (pipe->bufs) {
786 init_waitqueue_head(&pipe->wait); 786 init_waitqueue_head(&pipe->wait);
787 pipe->r_counter = pipe->w_counter = 1; 787 pipe->r_counter = pipe->w_counter = 1;
788 pipe->inode = inode;
789 pipe->buffers = PIPE_DEF_BUFFERS; 788 pipe->buffers = PIPE_DEF_BUFFERS;
790 mutex_init(&pipe->mutex); 789 mutex_init(&pipe->mutex);
791 return pipe; 790 return pipe;
diff --git a/fs/splice.c b/fs/splice.c
index 7efc2f5057fb..9f2a4447da50 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -218,7 +218,7 @@ ssize_t splice_to_pipe(struct pipe_inode_info *pipe,
218 page_nr++; 218 page_nr++;
219 ret += buf->len; 219 ret += buf->len;
220 220
221 if (pipe->inode) 221 if (pipe->files)
222 do_wakeup = 1; 222 do_wakeup = 1;
223 223
224 if (!--spd->nr_pages) 224 if (!--spd->nr_pages)
@@ -828,7 +828,7 @@ int splice_from_pipe_feed(struct pipe_inode_info *pipe, struct splice_desc *sd,
828 ops->release(pipe, buf); 828 ops->release(pipe, buf);
829 pipe->curbuf = (pipe->curbuf + 1) & (pipe->buffers - 1); 829 pipe->curbuf = (pipe->curbuf + 1) & (pipe->buffers - 1);
830 pipe->nrbufs--; 830 pipe->nrbufs--;
831 if (pipe->inode) 831 if (pipe->files)
832 sd->need_wakeup = true; 832 sd->need_wakeup = true;
833 } 833 }
834 834