* [djwong-xfs:xfile-page-caching 203/217] fs/xfs/scrub/dir_repair.c:642:41: warning: unused variable 'ino'
@ 2023-07-03 21:41 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-03 21:41 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git xfile-page-caching
head: c0ed27a65e17a5d3db3a6e2a4df60d4642524c8c
commit: 971ead598ffdc2c27849ce0a67d6600f17264b0d [203/217] xfs: online repair of directories
config: i386-randconfig-i005-20230703 (https://download.01.org/0day-ci/archive/20230704/202307040529.GE6mjSZd-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230704/202307040529.GE6mjSZd-lkp@intel.com/reproduce)
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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307040529.GE6mjSZd-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/xfs/scrub/dir_repair.c: In function 'xrep_dir_replay_update':
>> fs/xfs/scrub/dir_repair.c:642:41: warning: unused variable 'ino' [-Wunused-variable]
642 | xfs_ino_t ino;
| ^~~
vim +/ino +642 fs/xfs/scrub/dir_repair.c
625
626 /*
627 * Add this stashed incore directory entry to the temporary directory.
628 * The caller must hold the tempdir's IOLOCK, must not hold any ILOCKs, and
629 * must not be in transaction context.
630 */
631 STATIC int
632 xrep_dir_replay_update(
633 struct xrep_dir *rd,
634 const struct xrep_dirent *dirent)
635 {
636 struct xfs_name name = {
637 .len = dirent->namelen,
638 .type = dirent->ftype,
639 .name = rd->namebuf,
640 };
641 struct xfs_mount *mp = rd->sc->mp;
> 642 xfs_ino_t ino;
643 uint resblks;
644 int error;
645
646 resblks = XFS_LINK_SPACE_RES(mp, dirent->namelen);
647 error = xchk_trans_alloc(rd->sc, resblks);
648 if (error)
649 return error;
650
651 /* Lock the temporary directory and join it to the transaction */
652 xrep_tempfile_ilock(rd->sc);
653 xfs_trans_ijoin(rd->sc->tp, rd->sc->tempip, 0);
654
655 /*
656 * Create a replacement dirent in the temporary directory. Note that
657 * _createname doesn't check for existing entries. There shouldn't be
658 * any in the temporary dir, but we'll verify this in debug mode.
659 */
660 #ifdef DEBUG
661 error = xchk_dir_lookup(rd->sc, rd->sc->tempip, &name, &ino);
662 if (error != -ENOENT) {
663 ASSERT(error != -ENOENT);
664 goto out_cancel;
665 }
666 #endif
667
668 error = xrep_dir_replay_createname(rd, &name, dirent->ino, resblks);
669 if (error)
670 goto out_cancel;
671
672 if (name.type == XFS_DIR3_FT_DIR)
673 rd->subdirs++;
674 rd->dirents++;
675
676 /* Commit and unlock. */
677 error = xrep_trans_commit(rd->sc);
678 if (error)
679 return error;
680
681 xrep_tempfile_iunlock(rd->sc);
682 return 0;
683 out_cancel:
684 xchk_trans_cancel(rd->sc);
685 xrep_tempfile_iunlock(rd->sc);
686 return error;
687 }
688
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-03 21:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03 21:41 [djwong-xfs:xfile-page-caching 203/217] fs/xfs/scrub/dir_repair.c:642:41: warning: unused variable 'ino' kernel test robot
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.