Skip to content

Commit

Permalink
buffer: Remove check for PageError
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Wilcox (Oracle) committed Jun 29, 2022
1 parent 9329883 commit 6e8e79f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6e8e79f

Please sign in to comment.