diff options
author | Mark Brown <broonie@linaro.org> | 2014-02-14 12:15:57 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-14 12:15:57 +0000 |
commit | 6a7fe00e1f5a2e77b777b6e3b90c924c95bfa866 (patch) | |
tree | 1446c710e4a76d79fe11b1fa01ccb508f0d12d67 /fs/fuse/dev.c | |
parent | ccf1801b089f5575144c4346e4d7d3883a6c9163 (diff) | |
parent | 8415e604452966f981f20cb4d8a8a30e38a772dd (diff) |
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-androidlsk-android-14.02
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 0e16fc1cfcd3..8eb5a0992658 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -1300,22 +1300,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) @@ -1362,7 +1346,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++; |