[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220529055425.226363-4-xiang@kernel.org>
Date: Sun, 29 May 2022 13:54:25 +0800
From: Gao Xiang <xiang@...nel.org>
To: linux-erofs@...ts.ozlabs.org, Chao Yu <chao@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Gao Xiang <hsiangkao@...ux.alibaba.com>
Subject: [PATCH 3/3] erofs: simplify z_erofs_pcluster_readmore()
From: Gao Xiang <hsiangkao@...ux.alibaba.com>
Get rid of unnecessary label `skip'. No logic changes.
Signed-off-by: Gao Xiang <hsiangkao@...ux.alibaba.com>
---
fs/erofs/zdata.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 6dd858f94e44..b33fb64b3393 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -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;
--
2.30.2
Powered by blists - more mailing lists