All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [jlayton:ceph-async-dirops 19/19] fs/ceph/file.c:526:22: error: 'ceph_async_create_cb' undeclared; did you mean 'ceph_async_iput'?
Date: Tue, 03 Dec 2019 20:44:11 +0800	[thread overview]
Message-ID: <201912032008.nZPWMM7k%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6438 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-async-dirops
head:   084686f8f56db9193e8881e8be1869d3b264dede
commit: 084686f8f56db9193e8881e8be1869d3b264dede [19/19] ceph: attempt to do async create when possible
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 084686f8f56db9193e8881e8be1869d3b264dede
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=m68k 

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

All errors (new ones prefixed by >>):

   fs/ceph/file.c: In function 'ceph_atomic_open':
>> fs/ceph/file.c:526:22: error: 'ceph_async_create_cb' undeclared (first use in this function); did you mean 'ceph_async_iput'?
       req->r_callback = ceph_async_create_cb;
                         ^~~~~~~~~~~~~~~~~~~~
                         ceph_async_iput
   fs/ceph/file.c:526:22: note: each undeclared identifier is reported only once for each function it appears in
   fs/ceph/file.c:529:4: warning: statement with no effect [-Wunused-value]
       0:
       ^
>> fs/ceph/file.c:529:5: error: expected ';' before ':' token
       0:
        ^
   fs/ceph/file.c:532:4: warning: statement with no effect [-Wunused-value]
       -ECHILD:
       ^
   fs/ceph/file.c:532:11: error: expected ';' before ':' token
       -ECHILD:
              ^
>> fs/ceph/file.c:535:4: error: label at end of compound statement
       default:
       ^~~~~~~
   fs/ceph/file.c:476:7: warning: unused variable 'do_async' [-Wunused-variable]
     bool do_async;
          ^~~~~~~~

vim +526 fs/ceph/file.c

   461	
   462	/*
   463	 * Do a lookup + open with a single request.  If we get a non-existent
   464	 * file or symlink, return 1 so the VFS can retry.
   465	 */
   466	int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
   467			     struct file *file, unsigned flags, umode_t mode)
   468	{
   469		struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb);
   470		struct ceph_mds_client *mdsc = fsc->mdsc;
   471		struct ceph_mds_request *req;
   472		struct dentry *dn;
   473		struct ceph_acl_sec_ctx as_ctx = {};
   474		int mask;
   475		int err;
   476		bool do_async;
   477	
   478		dout("atomic_open %p dentry %p '%pd' %s flags %d mode 0%o\n",
   479		     dir, dentry, dentry,
   480		     d_unhashed(dentry) ? "unhashed" : "hashed", flags, mode);
   481	
   482		err = ceph_async_dirop_request_wait(dir);
   483		if (err)
   484			return err;
   485	
   486		if (dentry->d_name.len > NAME_MAX)
   487			return -ENAMETOOLONG;
   488	
   489		if (flags & O_CREAT) {
   490			if (ceph_quota_is_max_files_exceeded(dir))
   491				return -EDQUOT;
   492			err = ceph_pre_init_acls(dir, &mode, &as_ctx);
   493			if (err < 0)
   494				return err;
   495			err = ceph_security_init_secctx(dentry, mode, &as_ctx);
   496			if (err < 0)
   497				goto out_ctx;
   498		} else if (!d_in_lookup(dentry)) {
   499			/* If it's not being looked up, it's negative */
   500			return -ENOENT;
   501		}
   502	
   503		/* do the open */
   504		req = prepare_open_request(dir->i_sb, flags, mode);
   505		if (IS_ERR(req)) {
   506			err = PTR_ERR(req);
   507			goto out_ctx;
   508		}
   509		req->r_dentry = dget(dentry);
   510		req->r_num_caps = 2;
   511		mask = CEPH_STAT_CAP_INODE | CEPH_CAP_AUTH_SHARED;
   512		if (ceph_security_xattr_wanted(dir))
   513			mask |= CEPH_CAP_XATTR_SHARED;
   514		req->r_args.open.mask = cpu_to_le32(mask);
   515		req->r_parent = dir;
   516	
   517		if (flags & O_CREAT) {
   518			req->r_dentry_drop = CEPH_CAP_FILE_SHARED | CEPH_CAP_AUTH_EXCL;
   519			req->r_dentry_unless = CEPH_CAP_FILE_EXCL;
   520			if (as_ctx.pagelist) {
   521				req->r_pagelist = as_ctx.pagelist;
   522				as_ctx.pagelist = NULL;
   523			}
   524			if (get_caps_for_async_create(dir, dentry)) {
   525				set_bit(CEPH_MDS_R_DELEG_INO, &req->r_req_flags);
 > 526				req->r_callback = ceph_async_create_cb;
   527				err = ceph_mdsc_submit_request(mdsc, dir, req);
   528				switch (err) {
 > 529				0:
   530					/* set up inode, dentry and return */
   531					break;
   532				-ECHILD:
   533					/* do a sync create */
   534					break;
 > 535				default:
   536				}
   537				if (err != -ECHILD)
   538					goto out_req;
   539			}
   540		}
   541	
   542		set_bit(CEPH_MDS_R_PARENT_LOCKED, &req->r_req_flags);
   543	
   544		err = ceph_mdsc_do_request(mdsc,
   545					   (flags & (O_CREAT|O_TRUNC)) ? dir : NULL,
   546					   req);
   547		err = ceph_handle_snapdir(req, dentry, err);
   548		if (err)
   549			goto out_req;
   550	
   551		if ((flags & O_CREAT) && !req->r_reply_info.head->is_dentry)
   552			err = ceph_handle_notrace_create(dir, dentry);
   553	
   554		if (d_in_lookup(dentry)) {
   555			dn = ceph_finish_lookup(req, dentry, err);
   556			if (IS_ERR(dn))
   557				err = PTR_ERR(dn);
   558		} else {
   559			/* we were given a hashed negative dentry */
   560			dn = NULL;
   561		}
   562		if (err)
   563			goto out_req;
   564		if (dn || d_really_is_negative(dentry) || d_is_symlink(dentry)) {
   565			/* make vfs retry on splice, ENOENT, or symlink */
   566			dout("atomic_open finish_no_open on dn %p\n", dn);
   567			err = finish_no_open(file, dn);
   568		} else {
   569			dout("atomic_open finish_open on dn %p\n", dn);
   570			if (req->r_op == CEPH_MDS_OP_CREATE && req->r_reply_info.has_create_ino) {
   571				ceph_init_inode_acls(d_inode(dentry), &as_ctx);
   572				file->f_mode |= FMODE_CREATED;
   573			}
   574			err = finish_open(file, dentry, ceph_open);
   575		}
   576	out_req:
   577		if (!req->r_err && req->r_target_inode)
   578			ceph_put_fmode(ceph_inode(req->r_target_inode), req->r_fmode);
   579		ceph_mdsc_put_request(req);
   580	out_ctx:
   581		ceph_release_acl_sec_ctx(&as_ctx);
   582		dout("atomic_open result=%d\n", err);
   583		return err;
   584	}
   585	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 51371 bytes --]

                 reply	other threads:[~2019-12-03 12:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201912032008.nZPWMM7k%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.