Skip to content

Commit

Permalink
erofs: simplify z_erofs_pcluster_readmore()
Browse files Browse the repository at this point in the history
Get rid of unnecessary label `skip'. No logic changes.

Link: https://lore.kernel.org/r/20220529055425.226363-4-xiang@kernel.org
Acked-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
  • Loading branch information
Gao Xiang committed May 31, 2022
1 parent 39397a4 commit aa793b4
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions fs/erofs/zdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1436,22 +1436,19 @@ static void z_erofs_pcluster_readmore(struct z_erofs_decompress_frontend *f,
struct page *page;

page = erofs_grab_cache_page_nowait(inode->i_mapping, index);
if (!page)
goto skip;

if (PageUptodate(page)) {
unlock_page(page);
if (page) {
if (PageUptodate(page)) {
unlock_page(page);
} else {
err = z_erofs_do_read_page(f, page, pagepool);
if (err)
erofs_err(inode->i_sb,
"readmore error at page %lu @ nid %llu",
index, EROFS_I(inode)->nid);
}
put_page(page);
goto skip;
}

err = z_erofs_do_read_page(f, page, pagepool);
if (err)
erofs_err(inode->i_sb,
"readmore error at page %lu @ nid %llu",
index, EROFS_I(inode)->nid);
put_page(page);
skip:
if (cur < PAGE_SIZE)
break;
cur = (index << PAGE_SHIFT) - 1;
Expand Down

0 comments on commit aa793b4

Please sign in to comment.