[bigeasy-staging:seqcount 4/4] fs/nfs/nfs4proc.c:3044:15: error: implicit declaration of function 'seqcount_begin'; did you mean 'seqcount_init'?

From: kernel test robot
Date: Fri Oct 29 2021 - 15:41:19 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/staging.git seqcount
head: 23585d7067f694168efe0c82b86371339c7bdc51
commit: 23585d7067f694168efe0c82b86371339c7bdc51 [4/4] nfs: Use the lockdep version while using the seqcount.
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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/bigeasy/staging.git/commit/?id=23585d7067f694168efe0c82b86371339c7bdc51
git remote add bigeasy-staging https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/staging.git
git fetch --no-tags bigeasy-staging seqcount
git checkout 23585d7067f694168efe0c82b86371339c7bdc51
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc

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

All errors (new ones prefixed by >>):

fs/nfs/nfs4proc.c: In function '_nfs4_open_and_get_state':
>> fs/nfs/nfs4proc.c:3044:15: error: implicit declaration of function 'seqcount_begin'; did you mean 'seqcount_init'? [-Werror=implicit-function-declaration]
3044 | seq = seqcount_begin(&sp->so_reclaim_seqcount);
| ^~~~~~~~~~~~~~
| seqcount_init
cc1: all warnings being treated as errors
--
fs/nfs/delegation.c: In function 'nfs_delegation_claim_opens':
>> fs/nfs/delegation.c:205:23: error: implicit declaration of function 'seqcount_begin'; did you mean 'seqcount_init'? [-Werror=implicit-function-declaration]
205 | seq = seqcount_begin(&sp->so_reclaim_seqcount);
| ^~~~~~~~~~~~~~
| seqcount_init
cc1: all warnings being treated as errors


vim +3044 fs/nfs/nfs4proc.c

3030
3031 static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
3032 int flags, struct nfs_open_context *ctx)
3033 {
3034 struct nfs4_state_owner *sp = opendata->owner;
3035 struct nfs_server *server = sp->so_server;
3036 struct dentry *dentry;
3037 struct nfs4_state *state;
3038 fmode_t acc_mode = _nfs4_ctx_to_accessmode(ctx);
3039 struct inode *dir = d_inode(opendata->dir);
3040 unsigned long dir_verifier;
3041 unsigned int seq;
3042 int ret;
3043
> 3044 seq = seqcount_begin(&sp->so_reclaim_seqcount);
3045 dir_verifier = nfs_save_change_attribute(dir);
3046
3047 ret = _nfs4_proc_open(opendata, ctx);
3048 if (ret != 0)
3049 goto out;
3050
3051 state = _nfs4_opendata_to_nfs4_state(opendata);
3052 ret = PTR_ERR(state);
3053 if (IS_ERR(state))
3054 goto out;
3055 ctx->state = state;
3056 if (server->caps & NFS_CAP_POSIX_LOCK)
3057 set_bit(NFS_STATE_POSIX_LOCKS, &state->flags);
3058 if (opendata->o_res.rflags & NFS4_OPEN_RESULT_MAY_NOTIFY_LOCK)
3059 set_bit(NFS_STATE_MAY_NOTIFY_LOCK, &state->flags);
3060
3061 dentry = opendata->dentry;
3062 if (d_really_is_negative(dentry)) {
3063 struct dentry *alias;
3064 d_drop(dentry);
3065 alias = d_exact_alias(dentry, state->inode);
3066 if (!alias)
3067 alias = d_splice_alias(igrab(state->inode), dentry);
3068 /* d_splice_alias() can't fail here - it's a non-directory */
3069 if (alias) {
3070 dput(ctx->dentry);
3071 ctx->dentry = dentry = alias;
3072 }
3073 }
3074
3075 switch(opendata->o_arg.claim) {
3076 default:
3077 break;
3078 case NFS4_OPEN_CLAIM_NULL:
3079 case NFS4_OPEN_CLAIM_DELEGATE_CUR:
3080 case NFS4_OPEN_CLAIM_DELEGATE_PREV:
3081 if (!opendata->rpc_done)
3082 break;
3083 if (opendata->o_res.delegation_type != 0)
3084 dir_verifier = nfs_save_change_attribute(dir);
3085 nfs_set_verifier(dentry, dir_verifier);
3086 }
3087
3088 /* Parse layoutget results before we check for access */
3089 pnfs_parse_lgopen(state->inode, opendata->lgp, ctx);
3090
3091 ret = nfs4_opendata_access(sp->so_cred, opendata, state,
3092 acc_mode, flags);
3093 if (ret != 0)
3094 goto out;
3095
3096 if (d_inode(dentry) == state->inode) {
3097 nfs_inode_attach_open_context(ctx);
3098 if (read_seqcount_retry(&sp->so_reclaim_seqcount, seq))
3099 nfs4_schedule_stateid_recovery(server, state);
3100 }
3101
3102 out:
3103 if (!opendata->cancelled)
3104 nfs4_sequence_free_slot(&opendata->o_res.seq_res);
3105 return ret;
3106 }
3107

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip