fs/smb/client/connect.c:3647:37: error: invalid type argument of '->' (have 'struct cifs_mount_ctx')
Subsystems (2)
kernel test robot
build bottree: git://git.samba.org/sfrench/cifs-2.6.git for-next head: 0bc54e6a9c31ede9508fb81edbd11983494047ee commit: 311deca30437896573ce0bf5c302095533041abb [3/6] smb: client: guarantee refcounted children from parent session config: parisc-defconfig (https://download.01.org/0day-ci/archive/20240402/[email protected]/config) compiler: hppa-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240402/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
In file included from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/preempt.h:5, from ./arch/parisc/include/generated/asm/preempt.h:1, from include/linux/preempt.h:79,
from include/linux/spinlock.h:56,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/smb/client/connect.c:8:
fs/smb/client/connect.c: In function 'cifs_mount':
>> fs/smb/client/connect.c:3647:37: error: invalid type argument of '->' (have 'struct cifs_mount_ctx')
3647 | if (WARN_ON(!mnt_ctx->server))
| ^~
arch/parisc/include/asm/bug.h:86:32: note: in definition of macro 'WARN_ON'
86 | int __ret_warn_on = !!(x); \
| ^
fs/smb/client/connect.c:3649:42: error: invalid type argument of '->' (have 'struct cifs_mount_ctx')
3649 | else if (WARN_ON(!mnt_ctx->ses))
| ^~
arch/parisc/include/asm/bug.h:86:32: note: in definition of macro 'WARN_ON'
86 | int __ret_warn_on = !!(x); \
| ^
fs/smb/client/connect.c:3651:42: error: invalid type argument of '->' (have 'struct cifs_mount_ctx')
3651 | else if (WARN_ON(!mnt_ctx->tcon))
| ^~
arch/parisc/include/asm/bug.h:86:32: note: in definition of macro 'WARN_ON'
86 | int __ret_warn_on = !!(x); \
| ^vim +3647 fs/smb/client/connect.c
3590
3591 #ifdef CONFIG_CIFS_DFS_UPCALL
3592 int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx)
3593 {
3594 struct cifs_mount_ctx mnt_ctx = { .cifs_sb = cifs_sb, .fs_ctx = ctx, };
3595 bool isdfs;
3596 int rc;
3597
3598 rc = dfs_mount_share(&mnt_ctx, &isdfs);
3599 if (rc)
3600 goto error;
3601 if (!isdfs)
3602 goto out;
3603
3604 /*
3605 * After reconnecting to a different server, unique ids won't match anymore, so we disable
3606 * serverino. This prevents dentry revalidation to think the dentry are stale (ESTALE).
3607 */
3608 cifs_autodisable_serverino(cifs_sb);
3609 /*
3610 * Force the use of prefix path to support failover on DFS paths that resolve to targets
3611 * that have different prefix paths.
3612 */
3613 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH;
3614 kfree(cifs_sb->prepath);
3615 cifs_sb->prepath = ctx->prepath;
3616 ctx->prepath = NULL;
3617
3618 out:
3619 cifs_try_adding_channels(mnt_ctx.ses);
3620 rc = mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon);
3621 if (rc)
3622 goto error;
3623
3624 free_xid(mnt_ctx.xid);
3625 return rc;
3626
3627 error:
3628 cifs_mount_put_conns(&mnt_ctx);
3629 return rc;
3630 }
3631 #else
3632 int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx)
3633 {
3634 int rc = 0;
3635 struct cifs_mount_ctx mnt_ctx = { .cifs_sb = cifs_sb, .fs_ctx = ctx, };
3636
3637 rc = cifs_mount_get_session(&mnt_ctx);
3638 if (rc)
3639 goto error;
3640
3641 rc = cifs_mount_get_tcon(&mnt_ctx);
3642 if (!rc) {
3643 /*
3644 * Prevent superblock from being created with any missing
3645 * connections.
3646 */
> 3647 if (WARN_ON(!mnt_ctx->server))
3648 rc = -EHOSTDOWN;
3649 else if (WARN_ON(!mnt_ctx->ses))
3650 rc = -EACCES;
3651 else if (WARN_ON(!mnt_ctx->tcon))
3652 rc = -ENOENT;
3653 }
3654 if (rc)
3655 goto error;
3656
3657 rc = cifs_is_path_remote(&mnt_ctx);
3658 if (rc == -EREMOTE)
3659 rc = -EOPNOTSUPP;
3660 if (rc)
3661 goto error;
3662
3663 rc = mount_setup_tlink(cifs_sb, mnt_ctx.ses, mnt_ctx.tcon);
3664 if (rc)
3665 goto error;
3666
3667 free_xid(mnt_ctx.xid);
3668 return rc;
3669
3670 error:
3671 cifs_mount_put_conns(&mnt_ctx);
3672 return rc;
3673 }
3674 #endif
3675
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki