overlay filesystem
Hello Miklos Szeredi,
The patch e9be9d5e76e3: "overlay filesystem" from Oct 24, 2014, leads to the following static checker warning:
fs/overlayfs/readdir.c:392 ovl_iterate() warn: this array is probably non-NULL. 'p->name'
fs/overlayfs/readdir.c
387 while (od->cursor.l_node.next != &od->cache->entries) {
388 struct ovl_cache_entry *p;
389
390 p = list_entry(od->cursor.l_node.next, struct ovl_cache_entry, l_node);
391 /* Skip cursors */
392 if (p->name) {
^^^^^^^The "Skip cursors" comment suggests that some other check was intended?
393 if (!p->is_whiteout) {
394 if (!dir_emit(ctx, p->name, p->len, p->ino, p->type))
395 break;
396 }
397 ctx->pos++;
398 }
399 list_move(&od->cursor.l_node, &p->l_node);
400 }There are a couple others as well.
fs/overlayfs/readdir.c:254 ovl_dir_mark_whiteouts() warn: this array is probably non-NULL. 'p->name' fs/overlayfs/readdir.c:319 ovl_seek_cursor() warn: this array is probably non-NULL. 'p->name'
regards,
dan carpenter