diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 09:22:58 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 09:22:58 -0800 |
commit | 5ee7a81a9fd9f663acdd7ecf6c395bcfc014b98f (patch) | |
tree | cba7e99f5c3a1026ca3594d6656bf04db090c553 /fs/splice.c | |
parent | 0d90d638720ba14874e34cbd8766e4dc3f14f458 (diff) | |
parent | 7678ac50615d9c7a491d9861e020e4f5f71b594c (diff) | |
download | linux-stable-5ee7a81a9fd9f663acdd7ecf6c395bcfc014b98f.tar.gz linux-stable-5ee7a81a9fd9f663acdd7ecf6c395bcfc014b98f.tar.bz2 linux-stable-5ee7a81a9fd9f663acdd7ecf6c395bcfc014b98f.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse
Pull fuse update from Miklos Szeredi:
"This contains a fix for a potential use-after-module-unload bug
noticed by Al and caching improvements for read-only fuse filesystems
by Andrew Gallagher"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: support clients that don't implement 'open'
fuse: don't invalidate attrs when not using atime
fuse: fix SetPageUptodate() condition in STORE
fuse: fix pipe_buf_operations
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/splice.c b/fs/splice.c index 46a08f772d7d..12028fa41def 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -555,6 +555,24 @@ static const struct pipe_buf_operations default_pipe_buf_ops = { .get = generic_pipe_buf_get, }; +static int generic_pipe_buf_nosteal(struct pipe_inode_info *pipe, + struct pipe_buffer *buf) +{ + return 1; +} + +/* Pipe buffer operations for a socket and similar. */ +const struct pipe_buf_operations nosteal_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 = generic_pipe_buf_nosteal, + .get = generic_pipe_buf_get, +}; +EXPORT_SYMBOL(nosteal_pipe_buf_ops); + static ssize_t kernel_readv(struct file *file, const struct iovec *vec, unsigned long vlen, loff_t offset) { |