From bedd0c47a755fe56da300e5cb1a88453d880569b Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 20 May 2008 21:27:41 +0200 Subject: [PATCH] --- yaml --- r: 97413 b: refs/heads/master c: ca39d651d17df49b6d11f851d56c0ce0ce01ea1a h: refs/heads/master i: 97411: 26eeffd517c6d41de9446361bba0d0876ddac4de v: v3 --- [refs] | 2 +- trunk/fs/splice.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index d266d46bd994..e13f18533819 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a82c53a0e3f57f02782330372b7adad67b417645 +refs/heads/master: ca39d651d17df49b6d11f851d56c0ce0ce01ea1a diff --git a/trunk/fs/splice.c b/trunk/fs/splice.c index a048ad2130c3..aa5f6f60b305 100644 --- a/trunk/fs/splice.c +++ b/trunk/fs/splice.c @@ -58,8 +58,8 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe, */ wait_on_page_writeback(page); - if (PagePrivate(page)) - try_to_release_page(page, GFP_KERNEL); + if (PagePrivate(page) && !try_to_release_page(page, GFP_KERNEL)) + goto out_unlock; /* * 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, * Raced with truncate or failed to remove page from current * address space, unlock and return failure. */ +out_unlock: unlock_page(page); return 1; }