]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - mm/filemap.c
mm/filemap: don't allow partially uptodate page for pipes
[karo-tx-linux.git] / mm / filemap.c
index c7fe2f16503f9f906e3f01be0155818ef86c522e..50b52fe51937ca70e62a33ab1553aef9b77ad1a0 100644 (file)
@@ -1732,6 +1732,9 @@ find_page:
                        if (inode->i_blkbits == PAGE_SHIFT ||
                                        !mapping->a_ops->is_partially_uptodate)
                                goto page_not_up_to_date;
+                       /* pipes can't handle partially uptodate pages */
+                       if (unlikely(iter->type & ITER_PIPE))
+                               goto page_not_up_to_date;
                        if (!trylock_page(page))
                                goto page_not_up_to_date;
                        /* Did it get truncated before we got the lock? */