diff options
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/splice.c b/fs/splice.c index a048ad2130c3..aa5f6f60b305 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -58,8 +58,8 @@ static int page_cache_pipe_buf_steal(struct pipe_inode_info *pipe, | |||
58 | */ | 58 | */ |
59 | wait_on_page_writeback(page); | 59 | wait_on_page_writeback(page); |
60 | 60 | ||
61 | if (PagePrivate(page)) | 61 | if (PagePrivate(page) && !try_to_release_page(page, GFP_KERNEL)) |
62 | try_to_release_page(page, GFP_KERNEL); | 62 | goto out_unlock; |
63 | 63 | ||
64 | /* | 64 | /* |
65 | * If we succeeded in removing the mapping, set LRU flag | 65 | * 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 | * Raced with truncate or failed to remove page from current | 75 | * Raced with truncate or failed to remove page from current |
76 | * address space, unlock and return failure. | 76 | * address space, unlock and return failure. |
77 | */ | 77 | */ |
78 | out_unlock: | ||
78 | unlock_page(page); | 79 | unlock_page(page); |
79 | return 1; | 80 | return 1; |
80 | } | 81 | } |