* [trondmy-nfs:testing 12/12] fs/nfs/flexfilelayout/flexfilelayout.c:2536:13: error: use of undeclared identifier 'inode'
@ 2023-10-04 20:36 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-10-04 20:36 UTC (permalink / raw)
To: Trond Myklebust; +Cc: llvm, oe-kbuild-all, linux-nfs
tree: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git testing
head: a1a6c3d7c1edb81c0b4b20b44f0f4e7214c92116
commit: a1a6c3d7c1edb81c0b4b20b44f0f4e7214c92116 [12/12] pNFS/flexfiles: Check the layout validity in ff_layout_mirror_prepare_stats
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20231005/202310050440.0XpKt47j-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231005/202310050440.0XpKt47j-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/202310050440.0XpKt47j-lkp@intel.com/
All errors (new ones prefixed by >>):
fs/nfs/flexfilelayout/flexfilelayout.c:1230:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]
int err;
^
>> fs/nfs/flexfilelayout/flexfilelayout.c:2536:13: error: use of undeclared identifier 'inode'
lo = NFS_I(inode)->layout;
^
1 warning and 1 error generated.
vim +/inode +2536 fs/nfs/flexfilelayout/flexfilelayout.c
2522
2523 static int ff_layout_prepare_layoutstats(struct nfs42_layoutstat_args *args)
2524 {
2525 struct pnfs_layout_hdr *lo;
2526 struct nfs4_flexfile_layout *ff_layout;
2527 const int dev_count = PNFS_LAYOUTSTATS_MAXDEV;
2528
2529 /* For now, send at most PNFS_LAYOUTSTATS_MAXDEV statistics */
2530 args->devinfo = kmalloc_array(dev_count, sizeof(*args->devinfo),
2531 nfs_io_gfp_mask());
2532 if (!args->devinfo)
2533 return -ENOMEM;
2534
2535 spin_lock(&args->inode->i_lock);
> 2536 lo = NFS_I(inode)->layout;
2537 if (lo && pnfs_layout_is_valid(lo)) {
2538 ff_layout = FF_LAYOUT_FROM_HDR(lo);
2539 args->num_dev = ff_layout_mirror_prepare_stats(
2540 &ff_layout->generic_hdr, &args->devinfo[0], dev_count,
2541 NFS4_FF_OP_LAYOUTSTATS);
2542 } else
2543 args->num_dev = 0;
2544 spin_unlock(&args->inode->i_lock);
2545 if (!args->num_dev) {
2546 kfree(args->devinfo);
2547 args->devinfo = NULL;
2548 return -ENOENT;
2549 }
2550
2551 return 0;
2552 }
2553
--
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-10-04 20:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-04 20:36 [trondmy-nfs:testing 12/12] fs/nfs/flexfilelayout/flexfilelayout.c:2536:13: error: use of undeclared identifier 'inode' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).