From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH 08/12] nilfs2: convert checkpoint file to be folio-based
Date: Sat, 26 Oct 2024 19:33:48 +0800 [thread overview]
Message-ID: <202410261934.HqwZEx2G-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20241024092602.13395-9-konishi.ryusuke@gmail.com>
References: <20241024092602.13395-9-konishi.ryusuke@gmail.com>
TO: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Hi Ryusuke,
kernel test robot noticed the following build warnings:
[auto build test WARNING on konis-nilfs2/upstream]
[also build test WARNING on linus/master v6.12-rc4 next-20241025]
[cannot apply to akpm-mm/mm-everything]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Ryusuke-Konishi/nilfs2-convert-segment-buffer-to-be-folio-based/20241024-173025
base: https://github.com/konis/nilfs2 upstream
patch link: https://lore.kernel.org/r/20241024092602.13395-9-konishi.ryusuke%40gmail.com
patch subject: [PATCH 08/12] nilfs2: convert checkpoint file to be folio-based
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: i386-randconfig-141-20241026 (https://download.01.org/0day-ci/archive/20241026/202410261934.HqwZEx2G-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/202410261934.HqwZEx2G-lkp@intel.com/
New smatch warnings:
fs/nilfs2/cpfile.c:662 nilfs_cpfile_do_get_ssinfo() warn: passing freed memory 'bh'
Old smatch warnings:
fs/nilfs2/cpfile.c:687 nilfs_cpfile_do_get_ssinfo() warn: passing freed memory 'bh'
vim +/bh +662 fs/nilfs2/cpfile.c
29619809727a4e Koji Sato 2009-04-06 622
b028fcfc4cd198 Ryusuke Konishi 2009-04-06 623 static ssize_t nilfs_cpfile_do_get_ssinfo(struct inode *cpfile, __u64 *cnop,
0c6c44cb9f93f7 Ryusuke Konishi 2016-05-23 624 void *buf, unsigned int cisz,
0c6c44cb9f93f7 Ryusuke Konishi 2016-05-23 625 size_t nci)
29619809727a4e Koji Sato 2009-04-06 626 {
29619809727a4e Koji Sato 2009-04-06 627 struct buffer_head *bh;
29619809727a4e Koji Sato 2009-04-06 628 struct nilfs_cpfile_header *header;
29619809727a4e Koji Sato 2009-04-06 629 struct nilfs_checkpoint *cp;
003ff182fddde0 Ryusuke Konishi 2009-05-12 630 struct nilfs_cpinfo *ci = buf;
b028fcfc4cd198 Ryusuke Konishi 2009-04-06 631 __u64 curr = *cnop, next;
29619809727a4e Koji Sato 2009-04-06 632 unsigned long curr_blkoff, next_blkoff;
02954476a4ce12 Ryusuke Konishi 2024-10-24 633 size_t offset;
7fa10d20012296 Ryusuke Konishi 2009-04-06 634 int n = 0, ret;
29619809727a4e Koji Sato 2009-04-06 635
29619809727a4e Koji Sato 2009-04-06 636 down_read(&NILFS_MDT(cpfile)->mi_sem);
29619809727a4e Koji Sato 2009-04-06 637
b028fcfc4cd198 Ryusuke Konishi 2009-04-06 638 if (curr == 0) {
29619809727a4e Koji Sato 2009-04-06 639 ret = nilfs_cpfile_get_header_block(cpfile, &bh);
29619809727a4e Koji Sato 2009-04-06 640 if (ret < 0)
29619809727a4e Koji Sato 2009-04-06 641 goto out;
02954476a4ce12 Ryusuke Konishi 2024-10-24 642 header = kmap_local_folio(bh->b_folio, 0);
29619809727a4e Koji Sato 2009-04-06 643 curr = le64_to_cpu(header->ch_snapshot_list.ssl_next);
02954476a4ce12 Ryusuke Konishi 2024-10-24 644 kunmap_local(header);
29619809727a4e Koji Sato 2009-04-06 645 brelse(bh);
29619809727a4e Koji Sato 2009-04-06 646 if (curr == 0) {
29619809727a4e Koji Sato 2009-04-06 647 ret = 0;
29619809727a4e Koji Sato 2009-04-06 648 goto out;
29619809727a4e Koji Sato 2009-04-06 649 }
b028fcfc4cd198 Ryusuke Konishi 2009-04-06 650 } else if (unlikely(curr == ~(__u64)0)) {
b028fcfc4cd198 Ryusuke Konishi 2009-04-06 651 ret = 0;
b028fcfc4cd198 Ryusuke Konishi 2009-04-06 652 goto out;
b028fcfc4cd198 Ryusuke Konishi 2009-04-06 653 }
b028fcfc4cd198 Ryusuke Konishi 2009-04-06 654
29619809727a4e Koji Sato 2009-04-06 655 curr_blkoff = nilfs_cpfile_get_blkoff(cpfile, curr);
29619809727a4e Koji Sato 2009-04-06 656 ret = nilfs_cpfile_get_checkpoint_block(cpfile, curr, 0, &bh);
7fa10d20012296 Ryusuke Konishi 2009-04-06 657 if (unlikely(ret < 0)) {
7fa10d20012296 Ryusuke Konishi 2009-04-06 658 if (ret == -ENOENT)
7fa10d20012296 Ryusuke Konishi 2009-04-06 659 ret = 0; /* No snapshots (started from a hole block) */
29619809727a4e Koji Sato 2009-04-06 660 goto out;
7fa10d20012296 Ryusuke Konishi 2009-04-06 661 }
02954476a4ce12 Ryusuke Konishi 2024-10-24 @662 offset = nilfs_cpfile_checkpoint_offset(cpfile, curr, bh);
02954476a4ce12 Ryusuke Konishi 2024-10-24 663 cp = kmap_local_folio(bh->b_folio, offset);
7fa10d20012296 Ryusuke Konishi 2009-04-06 664 while (n < nci) {
b028fcfc4cd198 Ryusuke Konishi 2009-04-06 665 curr = ~(__u64)0; /* Terminator */
7fa10d20012296 Ryusuke Konishi 2009-04-06 666 if (unlikely(nilfs_checkpoint_invalid(cp) ||
7fa10d20012296 Ryusuke Konishi 2009-04-06 667 !nilfs_checkpoint_snapshot(cp)))
29619809727a4e Koji Sato 2009-04-06 668 break;
003ff182fddde0 Ryusuke Konishi 2009-05-12 669 nilfs_cpfile_checkpoint_to_cpinfo(cpfile, cp, ci);
003ff182fddde0 Ryusuke Konishi 2009-05-12 670 ci = (void *)ci + cisz;
003ff182fddde0 Ryusuke Konishi 2009-05-12 671 n++;
7fa10d20012296 Ryusuke Konishi 2009-04-06 672 next = le64_to_cpu(cp->cp_snapshot_list.ssl_next);
7fa10d20012296 Ryusuke Konishi 2009-04-06 673 if (next == 0)
7fa10d20012296 Ryusuke Konishi 2009-04-06 674 break; /* reach end of the snapshot list */
7fa10d20012296 Ryusuke Konishi 2009-04-06 675
02954476a4ce12 Ryusuke Konishi 2024-10-24 676 kunmap_local(cp);
29619809727a4e Koji Sato 2009-04-06 677 next_blkoff = nilfs_cpfile_get_blkoff(cpfile, next);
29619809727a4e Koji Sato 2009-04-06 678 if (curr_blkoff != next_blkoff) {
29619809727a4e Koji Sato 2009-04-06 679 brelse(bh);
29619809727a4e Koji Sato 2009-04-06 680 ret = nilfs_cpfile_get_checkpoint_block(cpfile, next,
29619809727a4e Koji Sato 2009-04-06 681 0, &bh);
7fa10d20012296 Ryusuke Konishi 2009-04-06 682 if (unlikely(ret < 0)) {
7fa10d20012296 Ryusuke Konishi 2009-04-06 683 WARN_ON(ret == -ENOENT);
29619809727a4e Koji Sato 2009-04-06 684 goto out;
7fa10d20012296 Ryusuke Konishi 2009-04-06 685 }
29619809727a4e Koji Sato 2009-04-06 686 }
02954476a4ce12 Ryusuke Konishi 2024-10-24 687 offset = nilfs_cpfile_checkpoint_offset(cpfile, next, bh);
02954476a4ce12 Ryusuke Konishi 2024-10-24 688 cp = kmap_local_folio(bh->b_folio, offset);
29619809727a4e Koji Sato 2009-04-06 689 curr = next;
29619809727a4e Koji Sato 2009-04-06 690 curr_blkoff = next_blkoff;
29619809727a4e Koji Sato 2009-04-06 691 }
02954476a4ce12 Ryusuke Konishi 2024-10-24 692 kunmap_local(cp);
29619809727a4e Koji Sato 2009-04-06 693 brelse(bh);
b028fcfc4cd198 Ryusuke Konishi 2009-04-06 694 *cnop = curr;
29619809727a4e Koji Sato 2009-04-06 695 ret = n;
29619809727a4e Koji Sato 2009-04-06 696
29619809727a4e Koji Sato 2009-04-06 697 out:
29619809727a4e Koji Sato 2009-04-06 698 up_read(&NILFS_MDT(cpfile)->mi_sem);
29619809727a4e Koji Sato 2009-04-06 699 return ret;
29619809727a4e Koji Sato 2009-04-06 700 }
29619809727a4e Koji Sato 2009-04-06 701
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-10-26 11:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-26 11:33 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-24 9:25 [PATCH 00/12] nilfs2: Finish folio conversion Ryusuke Konishi
2024-10-24 9:25 ` [PATCH 08/12] nilfs2: convert checkpoint file to be folio-based Ryusuke Konishi
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=202410261934.HqwZEx2G-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.