summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-18 00:12:25 +0200
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-06-29 14:51:06 +0200
commit0e00fa5f83606064f3b7bb11d9608d216ac6b45a (patch)
tree421e3ef3bf9588b45bf224261b585f3f2639b77b /block
parentdocs: Improve ->read_folio documentation (diff)
downloadlinux-0e00fa5f83606064f3b7bb11d9608d216ac6b45a.tar.xz
linux-0e00fa5f83606064f3b7bb11d9608d216ac6b45a.zip
block: Remove check of PageError
If read_mapping_page() sees a page with PageError set, it returns a PTR_ERR(). Checking PageError again is simply dead code. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'block')
-rw-r--r--block/partitions/core.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/block/partitions/core.c b/block/partitions/core.c
index 8a0ec929023b..a9a51bac42df 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -716,14 +716,10 @@ void *read_part_sector(struct parsed_partitions *state, sector_t n, Sector *p)
(pgoff_t)(n >> (PAGE_SHIFT - 9)), NULL);
if (IS_ERR(page))
goto out;
- if (PageError(page))
- goto out_put_page;
p->v = page;
return (unsigned char *)page_address(page) +
((n & ((1 << (PAGE_SHIFT - 9)) - 1)) << SECTOR_SHIFT);
-out_put_page:
- put_page(page);
out:
p->v = NULL;
return NULL;