* [snitzer:nfs-localio-for-6.11.v4 8/18] fs/nfs/flexfilelayout/flexfilelayout.c:199:24: sparse: sparse: Using plain integer as NULL pointer
@ 2024-06-19 17:36 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-06-19 17:36 UTC (permalink / raw)
To: Trond Myklebust; +Cc: oe-kbuild-all, Mike Snitzer, Peng Tao, Lance Shelton
tree: https://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git nfs-localio-for-6.11.v4
head: 5f16a352e5126c614e3c7130110341e13e09e68b
commit: 8560ceb5695d6ea3cfca97073bc16c1658d32852 [8/18] pnfs/flexfiles: Enable localio for flexfiles I/O
config: hexagon-randconfig-r122-20240619 (https://download.01.org/0day-ci/archive/20240620/202406200126.dzLssGrF-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 78ee473784e5ef6f0b19ce4cb111fb6e4d23c6b2)
reproduce: (https://download.01.org/0day-ci/archive/20240620/202406200126.dzLssGrF-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/202406200126.dzLssGrF-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
fs/nfs/flexfilelayout/flexfilelayout.c:199:24: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct file [noderef] __rcu *__new @@ got struct file *[assigned] new @@
fs/nfs/flexfilelayout/flexfilelayout.c:199:24: sparse: expected struct file [noderef] __rcu *__new
fs/nfs/flexfilelayout/flexfilelayout.c:199:24: sparse: got struct file *[assigned] new
>> fs/nfs/flexfilelayout/flexfilelayout.c:199:24: sparse: sparse: Using plain integer as NULL pointer
>> fs/nfs/flexfilelayout/flexfilelayout.c:199:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file *[assigned] filp @@ got struct file [noderef] __rcu *[assigned] __oldval @@
fs/nfs/flexfilelayout/flexfilelayout.c:199:22: sparse: expected struct file *[assigned] filp
fs/nfs/flexfilelayout/flexfilelayout.c:199:22: sparse: got struct file [noderef] __rcu *[assigned] __oldval
fs/nfs/flexfilelayout/flexfilelayout.c:205:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct file [noderef] __rcu **f @@ got struct file ** @@
fs/nfs/flexfilelayout/flexfilelayout.c:205:30: sparse: expected struct file [noderef] __rcu **f
fs/nfs/flexfilelayout/flexfilelayout.c:205:30: sparse: got struct file **
fs/nfs/flexfilelayout/flexfilelayout.c:336:38: sparse: sparse: self-comparison always evaluates to false
fs/nfs/flexfilelayout/flexfilelayout.c:339:62: sparse: sparse: self-comparison always evaluates to false
vim +199 fs/nfs/flexfilelayout/flexfilelayout.c
165
166 static struct file *
167 ff_local_open_fh(struct pnfs_layout_segment *lseg,
168 u32 ds_idx,
169 struct nfs_client *clp,
170 const struct cred *cred,
171 struct nfs_fh *fh,
172 fmode_t mode)
173 {
174 struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, ds_idx);
175 struct file *filp, *new, __rcu **pfile;
176
177 if (!nfs_server_is_local(clp))
178 return NULL;
179 if (mode & FMODE_WRITE) {
180 /*
181 * Always request read and write access since this corresponds
182 * to a rw layout.
183 */
184 mode |= FMODE_READ;
185 pfile = &mirror->rw_file;
186 } else
187 pfile = &mirror->ro_file;
188
189 new = NULL;
190 rcu_read_lock();
191 filp = rcu_dereference(*pfile);
192 if (!filp) {
193 rcu_read_unlock();
194 new = nfs_local_open_fh(clp, cred, fh, mode);
195 if (IS_ERR(new))
196 return NULL;
197 rcu_read_lock();
198 /* try to swap in the pointer */
> 199 filp = cmpxchg(pfile, NULL, new);
200 if (!filp) {
201 filp = new;
202 new = NULL;
203 }
204 }
205 filp = get_file_rcu(&filp);
206 rcu_read_unlock();
207 if (new)
208 fput(new);
209 return filp;
210 }
211
--
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-06-19 17:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19 17:36 [snitzer:nfs-localio-for-6.11.v4 8/18] fs/nfs/flexfilelayout/flexfilelayout.c:199:24: sparse: sparse: Using plain integer as NULL pointer 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.