* [openeuler:OLK-5.10 2882/2882] fs/cachefiles/xattr.c:221:5: warning: no previous prototype for 'cachefiles_check_old_object_xattr'
@ 2025-06-04 6:52 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-06-04 6:52 UTC (permalink / raw)
To: kernel, Baokun Li; +Cc: oe-kbuild-all
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: b5ec139da1a4916dfc9644ee3d9426dbd6f23c13
commit: 62cbbf255badab153207e0a54d04da8c345ae307 [2882/2882] cachefiles: use mainline xattr in ondemand mode
config: x86_64-buildonly-randconfig-2003-20250502 (https://download.01.org/0day-ci/archive/20250604/202506041414.VCeF5Rgv-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250604/202506041414.VCeF5Rgv-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/202506041414.VCeF5Rgv-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/cachefiles/xattr.c:221:5: warning: no previous prototype for 'cachefiles_check_old_object_xattr' [-Wmissing-prototypes]
221 | int cachefiles_check_old_object_xattr(struct cachefiles_object *object,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/cachefiles_check_old_object_xattr +221 fs/cachefiles/xattr.c
220
> 221 int cachefiles_check_old_object_xattr(struct cachefiles_object *object,
222 struct cachefiles_xattr *auxdata)
223 {
224 struct cachefiles_xattr *auxbuf;
225 unsigned int len = sizeof(struct cachefiles_xattr) + 512;
226 struct dentry *dentry = object->dentry;
227 int ret;
228
229 auxbuf = kmalloc(len, cachefiles_gfp);
230 if (!auxbuf)
231 return -ENOMEM;
232
233 /* read the current type label */
234 ret = vfs_getxattr(dentry, cachefiles_xattr_cache,
235 &auxbuf->type, 512 + 1);
236 if (ret < 0)
237 goto error;
238
239 /* check the on-disk object */
240 if (ret < 1) {
241 pr_err("Cache object %lu xattr length incorrect\n",
242 d_backing_inode(dentry)->i_ino);
243 goto stale;
244 }
245
246 if (auxbuf->type != auxdata->type)
247 goto stale;
248
249 auxbuf->len = ret;
250
251 /* consult the netfs */
252 if (object->fscache.cookie->def->check_aux) {
253 enum fscache_checkaux result;
254 unsigned int dlen;
255
256 dlen = auxbuf->len - 1;
257
258 _debug("checkaux %s #%u",
259 object->fscache.cookie->def->name, dlen);
260
261 result = fscache_check_aux(&object->fscache,
262 &auxbuf->data, dlen,
263 i_size_read(d_backing_inode(dentry)));
264
265 switch (result) {
266 /* entry okay as is */
267 case FSCACHE_CHECKAUX_OKAY:
268 goto okay;
269
270 /* entry requires update */
271 case FSCACHE_CHECKAUX_NEEDS_UPDATE:
272 break;
273
274 /* entry requires deletion */
275 case FSCACHE_CHECKAUX_OBSOLETE:
276 goto stale;
277
278 default:
279 BUG();
280 }
281
282 /* update the current label */
283 ret = vfs_setxattr(dentry, cachefiles_xattr_cache,
284 &auxdata->type, auxdata->len,
285 XATTR_REPLACE);
286 if (ret < 0) {
287 cachefiles_io_error_obj(object,
288 "Can't update xattr on %lu"
289 " (error %d)",
290 d_backing_inode(dentry)->i_ino, -ret);
291 goto error;
292 }
293 }
294
295 okay:
296 ret = 0;
297
298 error:
299 kfree(auxbuf);
300 return ret;
301
302 stale:
303 ret = -ESTALE;
304 goto error;
305 }
306
--
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:[~2025-06-04 6:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-04 6:52 [openeuler:OLK-5.10 2882/2882] fs/cachefiles/xattr.c:221:5: warning: no previous prototype for 'cachefiles_check_old_object_xattr' 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.