mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
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>
This commit is contained in:
parent
90c02eb9a7
commit
0e00fa5f83
@ -716,14 +716,10 @@ void *read_part_sector(struct parsed_partitions *state, sector_t n, Sector *p)
|
|||||||
(pgoff_t)(n >> (PAGE_SHIFT - 9)), NULL);
|
(pgoff_t)(n >> (PAGE_SHIFT - 9)), NULL);
|
||||||
if (IS_ERR(page))
|
if (IS_ERR(page))
|
||||||
goto out;
|
goto out;
|
||||||
if (PageError(page))
|
|
||||||
goto out_put_page;
|
|
||||||
|
|
||||||
p->v = page;
|
p->v = page;
|
||||||
return (unsigned char *)page_address(page) +
|
return (unsigned char *)page_address(page) +
|
||||||
((n & ((1 << (PAGE_SHIFT - 9)) - 1)) << SECTOR_SHIFT);
|
((n & ((1 << (PAGE_SHIFT - 9)) - 1)) << SECTOR_SHIFT);
|
||||||
out_put_page:
|
|
||||||
put_page(page);
|
|
||||||
out:
|
out:
|
||||||
p->v = NULL;
|
p->v = NULL;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user