summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-26 16:03:43 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-06-29 08:51:07 -0400
commit6e8e79fc84435c159891182cddab8e7784e1b3b2 (patch)
treed7943480394e377e49c335e4af6072de47df9b8b /fs
parent9329883a1c9b200bfe7f3c9e5338c407a690e39b (diff)
downloadlinux-6e8e79fc84435c159891182cddab8e7784e1b3b2.tar.gz
linux-6e8e79fc84435c159891182cddab8e7784e1b3b2.tar.bz2
linux-6e8e79fc84435c159891182cddab8e7784e1b3b2.zip
buffer: Remove check for PageError
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 276769d3715a..a0214e3f90d3 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -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;