mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] vmsplice: restrict stealing a little more
Apply the same rules as the anon pipe pages, only allow stealing if no one else is using the page. Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
a893b99be7
commit
330ab71619
3 changed files with 5 additions and 4 deletions
|
|
@ -184,8 +184,8 @@ void generic_pipe_buf_unmap(struct pipe_inode_info *pipe,
|
|||
kunmap(buf->page);
|
||||
}
|
||||
|
||||
static int anon_pipe_buf_steal(struct pipe_inode_info *pipe,
|
||||
struct pipe_buffer *buf)
|
||||
int generic_pipe_buf_steal(struct pipe_inode_info *pipe,
|
||||
struct pipe_buffer *buf)
|
||||
{
|
||||
struct page *page = buf->page;
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ static struct pipe_buf_operations anon_pipe_buf_ops = {
|
|||
.unmap = generic_pipe_buf_unmap,
|
||||
.pin = generic_pipe_buf_pin,
|
||||
.release = anon_pipe_buf_release,
|
||||
.steal = anon_pipe_buf_steal,
|
||||
.steal = generic_pipe_buf_steal,
|
||||
.get = generic_pipe_buf_get,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue