tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git 
for-rc5
head:   2d3c788681a406dc9382665aaa24e4c40b628049
commit: 861b55815045edf9e2d0834071840ecd83bd6dcd [10/12] gfs2: balance 
gfs2_qa_get and put inside gfs2_inode_create
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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 861b55815045edf9e2d0834071840ecd83bd6dcd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <[email protected]>

All errors (new ones prefixed by >>):

   fs/gfs2/inode.c: In function 'gfs2_create_inode':
>> fs/gfs2/inode.c:767:18: error: 'TRACE_QA_CREATE_INODE' undeclared (first use 
>> in this function)
     767 |  gfs2_qa_put(ip, TRACE_QA_CREATE_INODE);
         |                  ^~~~~~~~~~~~~~~~~~~~~
   fs/gfs2/inode.c:767:18: note: each undeclared identifier is reported only 
once for each function it appears in
>> fs/gfs2/inode.c:767:2: error: too many arguments to function 'gfs2_qa_put'
     767 |  gfs2_qa_put(ip, TRACE_QA_CREATE_INODE);
         |  ^~~~~~~~~~~
   In file included from fs/gfs2/inode.c:31:
   fs/gfs2/quota.h:19:13: note: declared here
      19 | extern void gfs2_qa_put(struct gfs2_inode *ip);
         |             ^~~~~~~~~~~
   fs/gfs2/inode.c:771:2: error: too many arguments to function 'gfs2_qa_put'
     771 |  gfs2_qa_put(dip, TRACE_QA_CREATE_INODE);
         |  ^~~~~~~~~~~
   In file included from fs/gfs2/inode.c:31:
   fs/gfs2/quota.h:19:13: note: declared here
      19 | extern void gfs2_qa_put(struct gfs2_inode *ip);
         |             ^~~~~~~~~~~

vim +/TRACE_QA_CREATE_INODE +767 fs/gfs2/inode.c

   557  
   558  /**
   559   * gfs2_create_inode - Create a new inode
   560   * @dir: The parent directory
   561   * @dentry: The new dentry
   562   * @file: If non-NULL, the file which is being opened
   563   * @mode: The permissions on the new inode
   564   * @dev: For device nodes, this is the device number
   565   * @symname: For symlinks, this is the link destination
   566   * @size: The initial size of the inode (ignored for directories)
   567   *
   568   * Returns: 0 on success, or error code
   569   */
   570  
   571  static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
   572                               struct file *file,
   573                               umode_t mode, dev_t dev, const char 
*symname,
   574                               unsigned int size, int excl)
   575  {
   576          const struct qstr *name = &dentry->d_name;
   577          struct posix_acl *default_acl, *acl;
   578          struct gfs2_holder ghs[2];
   579          struct inode *inode = NULL;
   580          struct gfs2_inode *dip = GFS2_I(dir), *ip;
   581          struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode);
   582          struct gfs2_glock *io_gl = NULL;
   583          int error, free_vfs_inode = 1;
   584          u32 aflags = 0;
   585          unsigned blocks = 1;
   586          struct gfs2_diradd da = { .bh = NULL, .save_loc = 1, };
   587  
   588          if (!name->len || name->len > GFS2_FNAMESIZE)
   589                  return -ENAMETOOLONG;
   590  
   591          error = gfs2_qa_get(dip);
   592          if (error)
   593                  return error;
   594  
   595          error = gfs2_rindex_update(sdp);
   596          if (error)
   597                  goto fail;
   598  
   599          error = gfs2_glock_nq_init(dip->i_gl, LM_ST_EXCLUSIVE, 0, ghs);
   600          if (error)
   601                  goto fail;
   602          gfs2_holder_mark_uninitialized(ghs + 1);
   603  
   604          error = create_ok(dip, name, mode);
   605          if (error)
   606                  goto fail_gunlock;
   607  
   608          inode = gfs2_dir_search(dir, &dentry->d_name, !S_ISREG(mode) || 
excl);
   609          error = PTR_ERR(inode);
   610          if (!IS_ERR(inode)) {
   611                  if (S_ISDIR(inode->i_mode)) {
   612                          iput(inode);
   613                          inode = ERR_PTR(-EISDIR);
   614                          goto fail_gunlock;
   615                  }
   616                  d_instantiate(dentry, inode);
   617                  error = 0;
   618                  if (file) {
   619                          if (S_ISREG(inode->i_mode))
   620                                  error = finish_open(file, dentry, 
gfs2_open_common);
   621                          else
   622                                  error = finish_no_open(file, NULL);
   623                  }
   624                  gfs2_glock_dq_uninit(ghs);
   625                  goto fail;
   626          } else if (error != -ENOENT) {
   627                  goto fail_gunlock;
   628          }
   629  
   630          error = gfs2_diradd_alloc_required(dir, name, &da);
   631          if (error < 0)
   632                  goto fail_gunlock;
   633  
   634          inode = new_inode(sdp->sd_vfs);
   635          error = -ENOMEM;
   636          if (!inode)
   637                  goto fail_gunlock;
   638  
   639          error = posix_acl_create(dir, &mode, &default_acl, &acl);
   640          if (error)
   641                  goto fail_gunlock;
   642  
   643          ip = GFS2_I(inode);
   644          inode->i_rdev = dev;
   645          error = gfs2_qa_get(ip);
   646          if (error)
   647                  goto fail_free_acls;
   648  
   649          inode->i_mode = mode;
   650          set_nlink(inode, S_ISDIR(mode) ? 2 : 1);
   651          inode->i_size = size;
   652          inode->i_atime = inode->i_mtime = inode->i_ctime = 
current_time(inode);
   653          munge_mode_uid_gid(dip, inode);
   654          check_and_update_goal(dip);
   655          ip->i_goal = dip->i_goal;
   656          ip->i_diskflags = 0;
   657          ip->i_eattr = 0;
   658          ip->i_height = 0;
   659          ip->i_depth = 0;
   660          ip->i_entries = 0;
   661          ip->i_no_addr = 0; /* Temporarily zero until real addr is 
assigned */
   662  
   663          switch(mode & S_IFMT) {
   664          case S_IFREG:
   665                  if ((dip->i_diskflags & GFS2_DIF_INHERIT_JDATA) ||
   666                      gfs2_tune_get(sdp, gt_new_files_jdata))
   667                          ip->i_diskflags |= GFS2_DIF_JDATA;
   668                  gfs2_set_aops(inode);
   669                  break;
   670          case S_IFDIR:
   671                  ip->i_diskflags |= (dip->i_diskflags & 
GFS2_DIF_INHERIT_JDATA);
   672                  ip->i_diskflags |= GFS2_DIF_JDATA;
   673                  ip->i_entries = 2;
   674                  break;
   675          }
   676  
   677          /* Force SYSTEM flag on all files and subdirs of a SYSTEM 
directory */
   678          if (dip->i_diskflags & GFS2_DIF_SYSTEM)
   679                  ip->i_diskflags |= GFS2_DIF_SYSTEM;
   680  
   681          gfs2_set_inode_flags(inode);
   682  
   683          if ((GFS2_I(d_inode(sdp->sd_root_dir)) == dip) ||
   684              (dip->i_diskflags & GFS2_DIF_TOPDIR))
   685                  aflags |= GFS2_AF_ORLOV;
   686  
   687          if (default_acl || acl)
   688                  blocks++;
   689  
   690          error = alloc_dinode(ip, aflags, &blocks);
   691          if (error)
   692                  goto fail_free_inode;
   693  
   694          gfs2_set_inode_blocks(inode, blocks);
   695  
   696          error = gfs2_glock_get(sdp, ip->i_no_addr, &gfs2_inode_glops, 
CREATE, &ip->i_gl);
   697          if (error)
   698                  goto fail_free_inode;
   699          flush_delayed_work(&ip->i_gl->gl_work);
   700          glock_set_object(ip->i_gl, ip);
   701  
   702          error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_SKIP, 
ghs + 1);
   703          if (error)
   704                  goto fail_free_inode;
   705  
   706          error = gfs2_trans_begin(sdp, blocks, 0);
   707          if (error)
   708                  goto fail_free_inode;
   709  
   710          if (blocks > 1) {
   711                  ip->i_eattr = ip->i_no_addr + 1;
   712                  gfs2_init_xattr(ip);
   713          }
   714          init_dinode(dip, ip, symname);
   715          gfs2_trans_end(sdp);
   716  
   717          error = gfs2_glock_get(sdp, ip->i_no_addr, &gfs2_iopen_glops, 
CREATE, &io_gl);
   718          if (error)
   719                  goto fail_free_inode;
   720  
   721          BUG_ON(test_and_set_bit(GLF_INODE_CREATING, &io_gl->gl_flags));
   722  
   723          error = gfs2_glock_nq_init(io_gl, LM_ST_SHARED, GL_EXACT, 
&ip->i_iopen_gh);
   724          if (error)
   725                  goto fail_gunlock2;
   726  
   727          glock_set_object(ip->i_iopen_gh.gh_gl, ip);
   728          gfs2_set_iop(inode);
   729          insert_inode_hash(inode);
   730  
   731          free_vfs_inode = 0; /* After this point, the inode is no longer
   732                                 considered free. Any failures need to 
undo
   733                                 the gfs2 structures. */
   734          if (default_acl) {
   735                  error = __gfs2_set_acl(inode, default_acl, 
ACL_TYPE_DEFAULT);
   736                  if (error)
   737                          goto fail_gunlock3;
   738                  posix_acl_release(default_acl);
   739                  default_acl = NULL;
   740          }
   741          if (acl) {
   742                  error = __gfs2_set_acl(inode, acl, ACL_TYPE_ACCESS);
   743                  if (error)
   744                          goto fail_gunlock3;
   745                  posix_acl_release(acl);
   746                  acl = NULL;
   747          }
   748  
   749          error = security_inode_init_security(&ip->i_inode, 
&dip->i_inode, name,
   750                                               &gfs2_initxattrs, NULL);
   751          if (error)
   752                  goto fail_gunlock3;
   753  
   754          error = link_dinode(dip, name, ip, &da);
   755          if (error)
   756                  goto fail_gunlock3;
   757  
   758          mark_inode_dirty(inode);
   759          d_instantiate(dentry, inode);
   760          /* After instantiate, errors should result in evict which will 
destroy
   761           * both inode and iopen glocks properly. */
   762          if (file) {
   763                  file->f_mode |= FMODE_CREATED;
   764                  error = finish_open(file, dentry, gfs2_open_common);
   765          }
   766          gfs2_glock_dq_uninit(ghs);
 > 767          gfs2_qa_put(ip, TRACE_QA_CREATE_INODE);
   768          gfs2_glock_dq_uninit(ghs + 1);
   769          clear_bit(GLF_INODE_CREATING, &io_gl->gl_flags);
   770          gfs2_glock_put(io_gl);
   771          gfs2_qa_put(dip, TRACE_QA_CREATE_INODE);
   772          return error;
   773  
   774  fail_gunlock3:
   775          glock_clear_object(io_gl, ip);
   776          gfs2_glock_dq_uninit(&ip->i_iopen_gh);
   777  fail_gunlock2:
   778          clear_bit(GLF_INODE_CREATING, &io_gl->gl_flags);
   779          gfs2_glock_put(io_gl);
   780  fail_free_inode:
   781          if (ip->i_gl) {
   782                  glock_clear_object(ip->i_gl, ip);
   783                  gfs2_glock_put(ip->i_gl);
   784          }
   785          gfs2_rs_delete(ip, NULL);
   786          gfs2_qa_put(ip);
   787  fail_free_acls:
   788          posix_acl_release(default_acl);
   789          posix_acl_release(acl);
   790  fail_gunlock:
   791          gfs2_dir_no_add(&da);
   792          gfs2_glock_dq_uninit(ghs);
   793          if (!IS_ERR_OR_NULL(inode)) {
   794                  clear_nlink(inode);
   795                  if (!free_vfs_inode)
   796                          mark_inode_dirty(inode);
   797                  set_bit(free_vfs_inode ? GIF_FREE_VFS_INODE : 
GIF_ALLOC_FAILED,
   798                          &GFS2_I(inode)->i_flags);
   799                  iput(inode);
   800          }
   801          if (gfs2_holder_initialized(ghs + 1))
   802                  gfs2_glock_dq_uninit(ghs + 1);
   803  fail:
   804          gfs2_qa_put(dip);
   805          return error;
   806  }
   807  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

Reply via email to