]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/splice.c
next-20160111/aio
[karo-tx-linux.git] / fs / splice.c
index 336db781a7617fc5caeb07b71df275a64485ea99..62e1946ead3ed715ff4219c610f122f1bb8951c9 100644 (file)
@@ -415,6 +415,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
                         */
                        if (!page->mapping) {
                                unlock_page(page);
+retry_lookup:
                                page = find_or_create_page(mapping, index,
                                                mapping_gfp_mask(mapping));
 
@@ -439,13 +440,10 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
                        error = mapping->a_ops->readpage(in, page);
                        if (unlikely(error)) {
                                /*
-                                * We really should re-lookup the page here,
-                                * but it complicates things a lot. Instead
-                                * lets just do what we already stored, and
-                                * we'll get it the next time we are called.
+                                * Re-lookup the page
                                 */
                                if (error == AOP_TRUNCATED_PAGE)
-                                       error = 0;
+                                       goto retry_lookup;
 
                                break;
                        }