]> Pileus Git - ~andy/linux/blobdiff - fs/splice.c
platinumfb: Use linux/of_{device,platform}.h instead of asm
[~andy/linux] / fs / splice.c
index a048ad2130c3e12497b52fc10efb9cb750e14e3f..aa5f6f60b3055f8a35b59084f0c652cb0e5c2125 100644 (file)
@@ -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;
 }