diff options
author | Mark Brown <broonie@linaro.org> | 2014-02-14 12:15:46 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-14 12:15:46 +0000 |
commit | 8415e604452966f981f20cb4d8a8a30e38a772dd (patch) | |
tree | 0c111cf6c6ed487c9baee37275621097d57f5127 /fs/fuse/dev.c | |
parent | 4b9c8ddadce3ec70fa5d93875adeda861b21c84e (diff) | |
parent | 29b5f720990fafc302a034468455426dd662e101 (diff) |
Merge tag 'v3.10.30' into linux-linaro-lskHEADlinux-linaro-lsk-v3.10linux-linaro-lsk
This is the 3.10.30 stable release
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 1d55f946540..23bf1a52a5d 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -1296,22 +1296,6 @@ static ssize_t fuse_dev_read(struct kiocb *iocb, const struct iovec *iov, return fuse_dev_do_read(fc, file, &cs, iov_length(iov, nr_segs)); } -static int fuse_dev_pipe_buf_steal(struct pipe_inode_info *pipe, - struct pipe_buffer *buf) -{ - return 1; -} - -static const struct pipe_buf_operations fuse_dev_pipe_buf_ops = { - .can_merge = 0, - .map = generic_pipe_buf_map, - .unmap = generic_pipe_buf_unmap, - .confirm = generic_pipe_buf_confirm, - .release = generic_pipe_buf_release, - .steal = fuse_dev_pipe_buf_steal, - .get = generic_pipe_buf_get, -}; - static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags) @@ -1358,7 +1342,11 @@ static ssize_t fuse_dev_splice_read(struct file *in, loff_t *ppos, buf->page = bufs[page_nr].page; buf->offset = bufs[page_nr].offset; buf->len = bufs[page_nr].len; - buf->ops = &fuse_dev_pipe_buf_ops; + /* + * Need to be careful about this. Having buf->ops in module + * code can Oops if the buffer persists after module unload. + */ + buf->ops = &nosteal_pipe_buf_ops; pipe->nrbufs++; page_nr++; |