* [snitzer:nfs-localio-for-next-6.11-rc3 26/26] fs/nfs/flexfilelayout/flexfilelayout.c:202:21: error: assignment to 'struct nfsd_file *' from incompatible pointer type 'struct file *'
@ 2024-08-17 15:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-08-17 15:02 UTC (permalink / raw)
To: Mike Snitzer; +Cc: oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git nfs-localio-for-next-6.11-rc3
head: d185b803ff9694a70f39b5e1cf3ea404782ef6dd
commit: d185b803ff9694a70f39b5e1cf3ea404782ef6dd [26/26] nfs: switch client to use nfsd_file for localio
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240817/202408172327.2okeBsqw-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240817/202408172327.2okeBsqw-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/202408172327.2okeBsqw-lkp@intel.com/
All errors (new ones prefixed by >>):
fs/nfs/flexfilelayout/flexfilelayout.c: In function 'ff_local_open_fh':
>> fs/nfs/flexfilelayout/flexfilelayout.c:202:21: error: assignment to 'struct nfsd_file *' from incompatible pointer type 'struct file *' [-Wincompatible-pointer-types]
202 | new = nfs_local_open_fh(clp, cred, fh, mode);
| ^
>> fs/nfs/flexfilelayout/flexfilelayout.c:213:17: error: 'struct nfs_client' has no member named 'nfsd_file_get'
213 | nf = clp->nfsd_file_get(nf);
| ^~
>> fs/nfs/flexfilelayout/flexfilelayout.c:216:20: error: 'struct nfs_client' has no member named 'nfsd_file_put'
216 | clp->nfsd_file_put(new);
| ^~
fs/nfs/flexfilelayout/flexfilelayout.c: In function 'ff_layout_free_mirror':
fs/nfs/flexfilelayout/flexfilelayout.c:301:20: error: 'struct nfs_client' has no member named 'nfsd_file_put'
301 | clp->nfsd_file_put(nf);
| ^~
fs/nfs/flexfilelayout/flexfilelayout.c:304:20: error: 'struct nfs_client' has no member named 'nfsd_file_put'
304 | clp->nfsd_file_put(nf);
| ^~
fs/nfs/flexfilelayout/flexfilelayout.c: In function 'ff_layout_alloc_lseg':
fs/nfs/flexfilelayout/flexfilelayout.c:590:78: error: 'struct nfs_client' has no member named 'nfsd_file_put'
590 | mirror->mirror_ds->ds->ds_clp->nfsd_file_put(nf);
| ^~
fs/nfs/flexfilelayout/flexfilelayout.c:598:78: error: 'struct nfs_client' has no member named 'nfsd_file_put'
598 | mirror->mirror_ds->ds->ds_clp->nfsd_file_put(nf);
| ^~
fs/nfs/flexfilelayout/flexfilelayout.c: In function 'ff_layout_io_track_ds_error':
fs/nfs/flexfilelayout/flexfilelayout.c:1299:13: warning: variable 'err' set but not used [-Wunused-but-set-variable]
1299 | int err;
| ^~~
vim +202 fs/nfs/flexfilelayout/flexfilelayout.c
d185b803ff9694 Mike Snitzer 2024-08-14 173
d185b803ff9694 Mike Snitzer 2024-08-14 174 static struct nfsd_file *
341000a1f1d534 Trond Myklebust 2019-11-03 175 ff_local_open_fh(struct pnfs_layout_segment *lseg,
341000a1f1d534 Trond Myklebust 2019-11-03 176 u32 ds_idx,
341000a1f1d534 Trond Myklebust 2019-11-03 177 struct nfs_client *clp,
341000a1f1d534 Trond Myklebust 2019-11-03 178 const struct cred *cred,
341000a1f1d534 Trond Myklebust 2019-11-03 179 struct nfs_fh *fh,
341000a1f1d534 Trond Myklebust 2019-11-03 180 fmode_t mode)
341000a1f1d534 Trond Myklebust 2019-11-03 181 {
341000a1f1d534 Trond Myklebust 2019-11-03 182 struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, ds_idx);
d185b803ff9694 Mike Snitzer 2024-08-14 183 struct nfsd_file *nf, *new, __rcu **pnf;
341000a1f1d534 Trond Myklebust 2019-11-03 184
341000a1f1d534 Trond Myklebust 2019-11-03 185 if (!nfs_server_is_local(clp))
341000a1f1d534 Trond Myklebust 2019-11-03 186 return NULL;
341000a1f1d534 Trond Myklebust 2019-11-03 187 if (mode & FMODE_WRITE) {
341000a1f1d534 Trond Myklebust 2019-11-03 188 /*
341000a1f1d534 Trond Myklebust 2019-11-03 189 * Always request read and write access since this corresponds
341000a1f1d534 Trond Myklebust 2019-11-03 190 * to a rw layout.
341000a1f1d534 Trond Myklebust 2019-11-03 191 */
341000a1f1d534 Trond Myklebust 2019-11-03 192 mode |= FMODE_READ;
d185b803ff9694 Mike Snitzer 2024-08-14 193 pnf = &mirror->rw_file;
341000a1f1d534 Trond Myklebust 2019-11-03 194 } else
d185b803ff9694 Mike Snitzer 2024-08-14 195 pnf = &mirror->ro_file;
341000a1f1d534 Trond Myklebust 2019-11-03 196
341000a1f1d534 Trond Myklebust 2019-11-03 197 new = NULL;
341000a1f1d534 Trond Myklebust 2019-11-03 198 rcu_read_lock();
d185b803ff9694 Mike Snitzer 2024-08-14 199 nf = rcu_dereference(*pnf);
d185b803ff9694 Mike Snitzer 2024-08-14 200 if (!nf) {
341000a1f1d534 Trond Myklebust 2019-11-03 201 rcu_read_unlock();
341000a1f1d534 Trond Myklebust 2019-11-03 @202 new = nfs_local_open_fh(clp, cred, fh, mode);
341000a1f1d534 Trond Myklebust 2019-11-03 203 if (IS_ERR(new))
341000a1f1d534 Trond Myklebust 2019-11-03 204 return NULL;
341000a1f1d534 Trond Myklebust 2019-11-03 205 rcu_read_lock();
341000a1f1d534 Trond Myklebust 2019-11-03 206 /* try to swap in the pointer */
d185b803ff9694 Mike Snitzer 2024-08-14 207 nf = cmpxchg(pnf, NULL, new);
d185b803ff9694 Mike Snitzer 2024-08-14 208 if (!nf) {
d185b803ff9694 Mike Snitzer 2024-08-14 209 nf = new;
341000a1f1d534 Trond Myklebust 2019-11-03 210 new = NULL;
341000a1f1d534 Trond Myklebust 2019-11-03 211 }
341000a1f1d534 Trond Myklebust 2019-11-03 212 }
d185b803ff9694 Mike Snitzer 2024-08-14 @213 nf = clp->nfsd_file_get(nf);
341000a1f1d534 Trond Myklebust 2019-11-03 214 rcu_read_unlock();
341000a1f1d534 Trond Myklebust 2019-11-03 215 if (new)
d185b803ff9694 Mike Snitzer 2024-08-14 @216 clp->nfsd_file_put(new);
d185b803ff9694 Mike Snitzer 2024-08-14 217 return nf;
341000a1f1d534 Trond Myklebust 2019-11-03 218 }
341000a1f1d534 Trond Myklebust 2019-11-03 219
:::::: The code at line 202 was first introduced by commit
:::::: 341000a1f1d534755829800b27ffd46890e4fa9e pnfs/flexfiles: enable localio support
:::::: TO: Trond Myklebust <trond.myklebust@hammerspace.com>
:::::: CC: Mike Snitzer <snitzer@kernel.org>
--
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:[~2024-08-17 15:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-17 15:02 [snitzer:nfs-localio-for-next-6.11-rc3 26/26] fs/nfs/flexfilelayout/flexfilelayout.c:202:21: error: assignment to 'struct nfsd_file *' from incompatible pointer type 'struct file *' 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.