“b05ebc8e9d3b66fece8344b2a2817caaa696b95a”上不存在“...git@gitcode.net:openanolis/dragonwell8_jdk.git”
提交 ca39d651 编写于 作者: J Jens Axboe

splice: handle try_to_release_page() failure

splice currently assumes that try_to_release_page() always suceeds,
but it can return failure. If it does, we cannot steal the page.

Acked-by: Mingming Cao <cmm@us.ibm.com
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 a82c53a0
...@@ -58,8 +58,8 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe, ...@@ -58,8 +58,8 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe,
*/ */
wait_on_page_writeback(page); wait_on_page_writeback(page);
if (PagePrivate(page)) if (PagePrivate(page) && !try_to_release_page(page, GFP_KERNEL))
try_to_release_page(page, GFP_KERNEL); goto out_unlock;
/* /*
* If we succeeded in removing the mapping, set LRU flag * If we succeeded in removing the mapping, set LRU flag
...@@ -75,6 +75,7 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe, ...@@ -75,6 +75,7 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe,
* Raced with truncate or failed to remove page from current * Raced with truncate or failed to remove page from current
* address space, unlock and return failure. * address space, unlock and return failure.
*/ */
out_unlock:
unlock_page(page); unlock_page(page);
return 1; return 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册