]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/splice.c
[PATCH] pipe: enable atomic copying of pipe data to/from user space
[mirror_ubuntu-artful-kernel.git] / fs / splice.c
index 0a6916423e7d264a3cdf0c127052d0af1b4bd665..d4664a297bab19e5119a158576e253388e9ae106 100644 (file)
@@ -640,13 +640,13 @@ find_page:
                /*
                 * Careful, ->map() uses KM_USER0!
                 */
-               char *src = buf->ops->map(info, buf);
+               char *src = buf->ops->map(info, buf, 1);
                char *dst = kmap_atomic(page, KM_USER1);
 
                memcpy(dst + offset, src + buf->offset, this_len);
                flush_dcache_page(page);
                kunmap_atomic(dst, KM_USER1);
-               buf->ops->unmap(info, buf);
+               buf->ops->unmap(info, buf, src);
        }
 
        ret = mapping->a_ops->commit_write(file, page, offset, offset+this_len);