lkml.org 
[lkml]   [2021]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[dhowells-fs:fscache-rewrite-indexing-2 61/64] fs/cifs/file.c:641:51: error: unused variable 'auxdata'
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-rewrite-indexing-2
head: 90bb44e5d6dcd202b7443fbe2dd1f71cd408b942
commit: caf16b68f740181a5d93053818bc5a27cd51b2c7 [61/64] cifs: Support fscache indexing rewrite (untested)
config: openrisc-buildonly-randconfig-r005-20211024 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=caf16b68f740181a5d93053818bc5a27cd51b2c7
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs fscache-rewrite-indexing-2
git checkout caf16b68f740181a5d93053818bc5a27cd51b2c7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=openrisc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

In file included from fs/cifs/file.c:32:
fs/cifs/fscache.h:103:38: error: redefinition of 'cifs_inode_cookie'
103 | static inline struct fscache_cookie *cifs_inode_cookie(struct inode *inode)
| ^~~~~~~~~~~~~~~~~
fs/cifs/fscache.h:93:38: note: previous definition of 'cifs_inode_cookie' with type 'struct fscache_cookie *(struct inode *)'
93 | static inline struct fscache_cookie *cifs_inode_cookie(struct inode *inode) { return NULL; }
| ^~~~~~~~~~~~~~~~~
fs/cifs/file.c: In function 'cifs_open':
fs/cifs/file.c:641:51: error: storage size of 'auxdata' isn't known
641 | struct cifs_fscache_inode_auxdata auxdata;
| ^~~~~~~
fs/cifs/file.c:642:17: error: implicit declaration of function 'cifs_fscache_fill_auxdata' [-Werror=implicit-function-declaration]
642 | cifs_fscache_fill_auxdata(file_inode(file), &auxdata);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> fs/cifs/file.c:641:51: error: unused variable 'auxdata' [-Werror=unused-variable]
641 | struct cifs_fscache_inode_auxdata auxdata;
| ^~~~~~~
fs/cifs/file.c: In function 'cifs_close':
fs/cifs/file.c:890:9: error: too many arguments to function 'cifs_fscache_unuse_inode_cookie'
890 | cifs_fscache_unuse_inode_cookie(inode, file->f_mode & FMODE_WRITE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from fs/cifs/file.c:32:
fs/cifs/fscache.h:92:20: note: declared here
92 | static inline void cifs_fscache_unuse_inode_cookie(struct inode *inode) {}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
In file included from fs/cifs/inode.c:25:
fs/cifs/fscache.h:103:38: error: redefinition of 'cifs_inode_cookie'
103 | static inline struct fscache_cookie *cifs_inode_cookie(struct inode *inode)
| ^~~~~~~~~~~~~~~~~
fs/cifs/fscache.h:93:38: note: previous definition of 'cifs_inode_cookie' with type 'struct fscache_cookie *(struct inode *)'
93 | static inline struct fscache_cookie *cifs_inode_cookie(struct inode *inode) { return NULL; }
| ^~~~~~~~~~~~~~~~~
fs/cifs/inode.c: In function 'cifs_invalidate_mapping':
fs/cifs/inode.c:2263:43: error: storage size of 'auxdata' isn't known
2263 | struct cifs_fscache_inode_auxdata auxdata;
| ^~~~~~~
fs/cifs/inode.c:2274:9: error: implicit declaration of function 'cifs_fscache_fill_auxdata' [-Werror=implicit-function-declaration]
2274 | cifs_fscache_fill_auxdata(&cifsi->vfs_inode, &auxdata);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> fs/cifs/inode.c:2263:43: error: unused variable 'auxdata' [-Werror=unused-variable]
2263 | struct cifs_fscache_inode_auxdata auxdata;
| ^~~~~~~
cc1: all warnings being treated as errors


vim +/auxdata +641 fs/cifs/file.c

515
516 {
517 int rc = -EACCES;
518 unsigned int xid;
519 __u32 oplock;
520 struct cifs_sb_info *cifs_sb;
521 struct TCP_Server_Info *server;
522 struct cifs_tcon *tcon;
523 struct tcon_link *tlink;
524 struct cifsFileInfo *cfile = NULL;
525 void *page;
526 const char *full_path;
527 bool posix_open_ok = false;
528 struct cifs_fid fid;
529 struct cifs_pending_open open;
530
531 xid = get_xid();
532
533 cifs_sb = CIFS_SB(inode->i_sb);
534 if (unlikely(cifs_forced_shutdown(cifs_sb))) {
535 free_xid(xid);
536 return -EIO;
537 }
538
539 tlink = cifs_sb_tlink(cifs_sb);
540 if (IS_ERR(tlink)) {
541 free_xid(xid);
542 return PTR_ERR(tlink);
543 }
544 tcon = tlink_tcon(tlink);
545 server = tcon->ses->server;
546
547 page = alloc_dentry_path();
548 full_path = build_path_from_dentry(file_dentry(file), page);
549 if (IS_ERR(full_path)) {
550 rc = PTR_ERR(full_path);
551 goto out;
552 }
553
554 cifs_dbg(FYI, "inode = 0x%p file flags are 0x%x for %s\n",
555 inode, file->f_flags, full_path);
556
557 if (file->f_flags & O_DIRECT &&
558 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO) {
559 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL)
560 file->f_op = &cifs_file_direct_nobrl_ops;
561 else
562 file->f_op = &cifs_file_direct_ops;
563 }
564
565 /* Get the cached handle as SMB2 close is deferred */
566 rc = cifs_get_readable_path(tcon, full_path, &cfile);
567 if (rc == 0) {
568 if (file->f_flags == cfile->f_flags) {
569 file->private_data = cfile;
570 spin_lock(&CIFS_I(inode)->deferred_lock);
571 cifs_del_deferred_close(cfile);
572 spin_unlock(&CIFS_I(inode)->deferred_lock);
573 goto out;
574 } else {
575 _cifsFileInfo_put(cfile, true, false);
576 }
577 }
578
579 if (server->oplocks)
580 oplock = REQ_OPLOCK;
581 else
582 oplock = 0;
583
584 if (!tcon->broken_posix_open && tcon->unix_ext &&
585 cap_unix(tcon->ses) && (CIFS_UNIX_POSIX_PATH_OPS_CAP &
586 le64_to_cpu(tcon->fsUnixInfo.Capability))) {
587 /* can not refresh inode info since size could be stale */
588 rc = cifs_posix_open(full_path, &inode, inode->i_sb,
589 cifs_sb->ctx->file_mode /* ignored */,
590 file->f_flags, &oplock, &fid.netfid, xid);
591 if (rc == 0) {
592 cifs_dbg(FYI, "posix open succeeded\n");
593 posix_open_ok = true;
594 } else if ((rc == -EINVAL) || (rc == -EOPNOTSUPP)) {
595 if (tcon->ses->serverNOS)
596 cifs_dbg(VFS, "server %s of type %s returned unexpected error on SMB posix open, disabling posix open support. Check if server update available.\n",
597 tcon->ses->ip_addr,
598 tcon->ses->serverNOS);
599 tcon->broken_posix_open = true;
600 } else if ((rc != -EIO) && (rc != -EREMOTE) &&
601 (rc != -EOPNOTSUPP)) /* path not found or net err */
602 goto out;
603 /*
604 * Else fallthrough to retry open the old way on network i/o
605 * or DFS errors.
606 */
607 }
608
609 if (server->ops->get_lease_key)
610 server->ops->get_lease_key(inode, &fid);
611
612 cifs_add_pending_open(&fid, tlink, &open);
613
614 if (!posix_open_ok) {
615 if (server->ops->get_lease_key)
616 server->ops->get_lease_key(inode, &fid);
617
618 rc = cifs_nt_open(full_path, inode, cifs_sb, tcon,
619 file->f_flags, &oplock, &fid, xid);
620 if (rc) {
621 cifs_del_pending_open(&open);
622 goto out;
623 }
624 }
625
626 cfile = cifs_new_fileinfo(&fid, file, tlink, oplock);
627 if (cfile == NULL) {
628 if (server->ops->close)
629 server->ops->close(xid, tcon, &fid);
630 cifs_del_pending_open(&open);
631 rc = -ENOMEM;
632 goto out;
633 }
634
635
636 fscache_use_cookie(cifs_inode_cookie(file_inode(file)),
637 file->f_mode & FMODE_WRITE);
638 if (file->f_flags & O_DIRECT &&
639 (!((file->f_flags & O_ACCMODE) != O_RDONLY) ||
640 file->f_flags & O_APPEND)) {
> 641 struct cifs_fscache_inode_auxdata auxdata;
642 cifs_fscache_fill_auxdata(file_inode(file), &auxdata);
643 fscache_invalidate(cifs_inode_cookie(file_inode(file)),
644 &auxdata, i_size_read(file_inode(file)),
645 FSCACHE_INVAL_DIO_WRITE);
646 }
647
648 if ((oplock & CIFS_CREATE_ACTION) && !posix_open_ok && tcon->unix_ext) {
649 /*
650 * Time to set mode which we can not set earlier due to
651 * problems creating new read-only files.
652 */
653 struct cifs_unix_set_info_args args = {
654 .mode = inode->i_mode,
655 .uid = INVALID_UID, /* no change */
656 .gid = INVALID_GID, /* no change */
657 .ctime = NO_CHANGE_64,
658 .atime = NO_CHANGE_64,
659 .mtime = NO_CHANGE_64,
660 .device = 0,
661 };
662 CIFSSMBUnixSetFileInfo(xid, tcon, &args, fid.netfid,
663 cfile->pid);
664 }
665
666 out:
667 free_dentry_path(page);
668 free_xid(xid);
669 cifs_put_tlink(tlink);
670 return rc;
671 }
672

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-11-11 17:00    [W:0.039 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site