]> git.baikalelectronics.ru Git - kernel.git/commitdiff
buffer: Remove check for PageError
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 26 May 2022 20:03:43 +0000 (16:03 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 29 Jun 2022 12:51:07 +0000 (08:51 -0400)
If a buffer is completed with an error, its uptodate flag will be clear,
so the page_uptodate variable will have been set to 0.  There's no
need to check PageError here.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
fs/buffer.c

index 276769d3715a8450fa7123f507245f2d7b0c28bd..a0214e3f90d367a22ffb315eddff2197538eb35b 100644 (file)
@@ -282,10 +282,10 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate)
        spin_unlock_irqrestore(&first->b_uptodate_lock, flags);
 
        /*
-        * If none of the buffers had errors and they are all
-        * uptodate then we can set the page uptodate.
+        * If all of the buffers are uptodate then we can set the page
+        * uptodate.
         */
-       if (page_uptodate && !PageError(page))
+       if (page_uptodate)
                SetPageUptodate(page);
        unlock_page(page);
        return;