From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [xiang-erofs:dev-test 8/10] fs/erofs/zdata.c:554 z_erofs_bind_cache() error: uninitialized symbol 'newfolio'.
Date: Mon, 20 Jan 2025 05:02:01 +0800 [thread overview]
Message-ID: <202501200425.hQ3emWTb-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Xiang Gao <xiang@kernel.org>
CC: linux-erofs@lists.ozlabs.org
TO: Gao Xiang <hsiangkao@linux.alibaba.com>
CC: Chao Yu <yuchao0@huawei.com>, Chao Yu <chao@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git dev-test
head: 6e2c2342e2b608264cf763a27410295b05995191
commit: e180b8c4c23beb876927a999c49c18b361fa7975 [8/10] erofs: convert z_erofs_bind_cache() to folios
:::::: branch date: 5 hours ago
:::::: commit date: 3 days ago
config: x86_64-randconfig-r073-20250119 (https://download.01.org/0day-ci/archive/20250120/202501200425.hQ3emWTb-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202501200425.hQ3emWTb-lkp@intel.com/
New smatch warnings:
fs/erofs/zdata.c:554 z_erofs_bind_cache() error: uninitialized symbol 'newfolio'.
Old smatch warnings:
fs/erofs/zdata.c:1028 z_erofs_scan_folio() error: we previously assumed 'f->pcl' could be null (see line 1024)
vim +/newfolio +554 fs/erofs/zdata.c
1282dea37b0908 fs/erofs/zdata.c Gao Xiang 2022-12-06 512
6f435e94a19ad2 fs/erofs/zdata.c Gao Xiang 2025-01-14 513 static void z_erofs_bind_cache(struct z_erofs_frontend *fe)
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 514 {
6f39d1e1ca4678 fs/erofs/zdata.c Gao Xiang 2022-03-02 515 struct address_space *mc = MNGD_MAPPING(EROFS_I_SB(fe->inode));
5c6dcc57e2e505 fs/erofs/zdata.c Gao Xiang 2022-03-02 516 struct z_erofs_pcluster *pcl = fe->pcl;
54ed3fdd66055d fs/erofs/zdata.c Gao Xiang 2023-12-06 517 unsigned int pclusterpages = z_erofs_pclusterpages(pcl);
1282dea37b0908 fs/erofs/zdata.c Gao Xiang 2022-12-06 518 bool shouldalloc = z_erofs_should_alloc_cache(fe);
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 519 bool may_bypass = true;
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 520 /* Optimistic allocation, as in-place I/O can be used as a fallback */
1825c8d7ce93c4 fs/erofs/zdata.c Gao Xiang 2020-12-09 521 gfp_t gfp = (mapping_gfp_mask(mc) & ~__GFP_DIRECT_RECLAIM) |
1825c8d7ce93c4 fs/erofs/zdata.c Gao Xiang 2020-12-09 522 __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN;
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 523 struct folio *folio, *newfolio;
ed722fbccadb74 fs/erofs/zdata.c Gao Xiang 2022-07-15 524 unsigned int i;
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 525
cc4b2dd95f0d1e fs/erofs/zdata.c Gao Xiang 2024-01-25 526 if (i_blocksize(fe->inode) != PAGE_SIZE ||
cc4b2dd95f0d1e fs/erofs/zdata.c Gao Xiang 2024-01-25 527 fe->mode < Z_EROFS_PCLUSTER_FOLLOWED)
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 528 return;
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 529
54ed3fdd66055d fs/erofs/zdata.c Gao Xiang 2023-12-06 530 for (i = 0; i < pclusterpages; ++i) {
cc4b2dd95f0d1e fs/erofs/zdata.c Gao Xiang 2024-01-25 531 /* Inaccurate check w/o locking to avoid unneeded lookups */
ed722fbccadb74 fs/erofs/zdata.c Gao Xiang 2022-07-15 532 if (READ_ONCE(pcl->compressed_bvecs[i].page))
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 533 continue;
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 534
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 535 folio = filemap_get_folio(mc, pcl->index + i);
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 536 if (IS_ERR(folio)) {
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 537 may_bypass = false;
1282dea37b0908 fs/erofs/zdata.c Gao Xiang 2022-12-06 538 if (!shouldalloc)
1282dea37b0908 fs/erofs/zdata.c Gao Xiang 2022-12-06 539 continue;
1282dea37b0908 fs/erofs/zdata.c Gao Xiang 2022-12-06 540
1282dea37b0908 fs/erofs/zdata.c Gao Xiang 2022-12-06 541 /*
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 542 * Allocate a managed folio for cached I/O, or it may be
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 543 * then filled with a file-backed folio for in-place I/O
1282dea37b0908 fs/erofs/zdata.c Gao Xiang 2022-12-06 544 */
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 545 newfolio = filemap_alloc_folio(gfp, 0);
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 546 if (!newfolio)
0b964600d3aae5 fs/erofs/zdata.c Gao Xiang 2021-03-22 547 continue;
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 548 newfolio->private = Z_EROFS_PREALLOCATED_FOLIO;
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 549 folio = NULL;
0b964600d3aae5 fs/erofs/zdata.c Gao Xiang 2021-03-22 550 }
bf1aa03980f4eb fs/erofs/zdata.c Gao Xiang 2024-10-21 551 spin_lock(&pcl->lockref.lock);
cc4b2dd95f0d1e fs/erofs/zdata.c Gao Xiang 2024-01-25 552 if (!pcl->compressed_bvecs[i].page) {
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 553 pcl->compressed_bvecs[i].page =
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 @554 folio_page(folio ?: newfolio, 0);
bf1aa03980f4eb fs/erofs/zdata.c Gao Xiang 2024-10-21 555 spin_unlock(&pcl->lockref.lock);
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 556 continue;
cc4b2dd95f0d1e fs/erofs/zdata.c Gao Xiang 2024-01-25 557 }
bf1aa03980f4eb fs/erofs/zdata.c Gao Xiang 2024-10-21 558 spin_unlock(&pcl->lockref.lock);
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 559 folio_put(folio ?: newfolio);
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 560 }
92e6efd566c4a1 drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-12-08 561
0b964600d3aae5 fs/erofs/zdata.c Gao Xiang 2021-03-22 562 /*
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 563 * Don't perform in-place I/O if all compressed pages are available in
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 564 * the managed cache, as the pcluster can be moved to the bypass queue.
0b964600d3aae5 fs/erofs/zdata.c Gao Xiang 2021-03-22 565 */
e180b8c4c23beb fs/erofs/zdata.c Gao Xiang 2025-01-14 566 if (may_bypass)
db166fc2020d30 fs/erofs/zdata.c Gao Xiang 2022-07-15 567 fe->mode = Z_EROFS_PCLUSTER_FOLLOWED_NOINPLACE;
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 568 }
105d4ad857dcbf drivers/staging/erofs/unzip_vle.c Gao Xiang 2018-07-26 569
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-01-19 21:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202501200425.hQ3emWTb-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.