Re: [PATCH 4/6] autofs - use struct for mount params

2018-11-13 Thread Ian Kent
On Wed, 2018-11-14 at 09:54 +0800, kbuild test robot wrote:
> Hi Ian,
> 
> I love your patch! Yet something to improve:
> 
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.20-rc2]
> [cannot apply to next-20181113]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system]
> 
> url:
> https://github.com/0day-ci/linux/commits/Ian-Kent/autofs-improve-ioctl-sbi-checks/20181114-021150
> config: i386-allmodconfig (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=i386 
> 
> All errors (new ones prefixed by >>):
> 
>fs/autofs/inode.c: In function 'autofs_fill_super':
> > > fs/autofs/inode.c:361:28: error: invalid type argument of '->' (have
> > > 'struct autofs_fs_params')
> 
>  root_inode->i_uid = params->uid;
>^~
>fs/autofs/inode.c:362:28: error: invalid type argument of '->' (have
> 'struct autofs_fs_params')
>  root_inode->i_gid = params->gid;
>^~

Oh, I fixed that, I must have messed up somewhere, I'll check what I have
again.

Andrew, due to the patch order dependencies I think it would be best for
me to re-post the series so please ignore this series.

I'll put a v2 in the title of the re-posted series so they can be identified
(is that the right thing to do?).

> 
> vim +361 fs/autofs/inode.c
> 
>313
>314int autofs_fill_super(struct super_block *s, void *data, int
> silent)
>315{
>316struct inode *root_inode;
>317struct dentry *root;
>318struct autofs_fs_params params;
>319struct autofs_sb_info *sbi;
>320struct autofs_info *ino;
>321int ret = -EINVAL;
>322
>323sbi = autofs_alloc_sbi(s);
>324if (!sbi)
>325return -ENOMEM;
>326
>327pr_debug("starting up, sbi = %p\n", sbi);
>328
>329s->s_fs_info = sbi;
>330s->s_blocksize = 1024;
>331s->s_blocksize_bits = 10;
>332s->s_magic = AUTOFS_SUPER_MAGIC;
>333s->s_op = _sops;
>334s->s_d_op = _dentry_operations;
>335s->s_time_gran = 1;
>336
>337/*
>338 * Get the root inode and dentry, but defer checking for
> errors.
>339 */
>340ino = autofs_new_ino(sbi);
>341if (!ino) {
>342ret = -ENOMEM;
>343goto fail_free;
>344}
>345root_inode = autofs_get_inode(s, S_IFDIR | 0755);
>346if (!root_inode) {
>347ret = -ENOMEM;
>348goto fail_ino;
>349}
>350root = d_make_root(root_inode);
>351if (!root)
>352goto fail_iput;
>353
>354root->d_fsdata = ino;
>355
>356memset(, 0, sizeof(struct autofs_fs_params));
>357if (autofs_parse_options(data, )) {
>358pr_err("called with bogus options\n");
>359goto fail_dput;
>360}
>  > 361root_inode->i_uid = params->uid;
>362root_inode->i_gid = params->gid;
>363
>364ret = autofs_apply_sbi_options(sbi, );
>365if (ret)
>366goto fail_dput;
>367
>368if (autofs_type_trigger(sbi->type))
>369__managed_dentry_set_managed(root);
>370
>371root_inode->i_fop = _root_operations;
>372root_inode->i_op = _dir_inode_operations;
>373
>374/*
>375 * Success! Install the root dentry now to indicate
> completion.
>376 */
>377s->s_root = root;
>378return 0;
>379
>380/*
>381 * Failure ... clean up.
>382 */
>383fail_dput:
>384dput(root);
>385goto fail_free;
>386fail_iput:
>387iput(root_inode);
>388fail_ino:
>389autofs_free_ino(ino);
>390fail_free:
>391kfree(sbi);
>392s->s_fs_info = NULL;
>393return ret;
>394}
>395
> 
> ---
> 0-DAY kernel test infrastructureOpen Source 

Re: [PATCH 4/6] autofs - use struct for mount params

2018-11-13 Thread Ian Kent
On Wed, 2018-11-14 at 09:54 +0800, kbuild test robot wrote:
> Hi Ian,
> 
> I love your patch! Yet something to improve:
> 
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.20-rc2]
> [cannot apply to next-20181113]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system]
> 
> url:
> https://github.com/0day-ci/linux/commits/Ian-Kent/autofs-improve-ioctl-sbi-checks/20181114-021150
> config: i386-allmodconfig (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=i386 
> 
> All errors (new ones prefixed by >>):
> 
>fs/autofs/inode.c: In function 'autofs_fill_super':
> > > fs/autofs/inode.c:361:28: error: invalid type argument of '->' (have
> > > 'struct autofs_fs_params')
> 
>  root_inode->i_uid = params->uid;
>^~
>fs/autofs/inode.c:362:28: error: invalid type argument of '->' (have
> 'struct autofs_fs_params')
>  root_inode->i_gid = params->gid;
>^~

Oh, I fixed that, I must have messed up somewhere, I'll check what I have
again.

Andrew, due to the patch order dependencies I think it would be best for
me to re-post the series so please ignore this series.

I'll put a v2 in the title of the re-posted series so they can be identified
(is that the right thing to do?).

> 
> vim +361 fs/autofs/inode.c
> 
>313
>314int autofs_fill_super(struct super_block *s, void *data, int
> silent)
>315{
>316struct inode *root_inode;
>317struct dentry *root;
>318struct autofs_fs_params params;
>319struct autofs_sb_info *sbi;
>320struct autofs_info *ino;
>321int ret = -EINVAL;
>322
>323sbi = autofs_alloc_sbi(s);
>324if (!sbi)
>325return -ENOMEM;
>326
>327pr_debug("starting up, sbi = %p\n", sbi);
>328
>329s->s_fs_info = sbi;
>330s->s_blocksize = 1024;
>331s->s_blocksize_bits = 10;
>332s->s_magic = AUTOFS_SUPER_MAGIC;
>333s->s_op = _sops;
>334s->s_d_op = _dentry_operations;
>335s->s_time_gran = 1;
>336
>337/*
>338 * Get the root inode and dentry, but defer checking for
> errors.
>339 */
>340ino = autofs_new_ino(sbi);
>341if (!ino) {
>342ret = -ENOMEM;
>343goto fail_free;
>344}
>345root_inode = autofs_get_inode(s, S_IFDIR | 0755);
>346if (!root_inode) {
>347ret = -ENOMEM;
>348goto fail_ino;
>349}
>350root = d_make_root(root_inode);
>351if (!root)
>352goto fail_iput;
>353
>354root->d_fsdata = ino;
>355
>356memset(, 0, sizeof(struct autofs_fs_params));
>357if (autofs_parse_options(data, )) {
>358pr_err("called with bogus options\n");
>359goto fail_dput;
>360}
>  > 361root_inode->i_uid = params->uid;
>362root_inode->i_gid = params->gid;
>363
>364ret = autofs_apply_sbi_options(sbi, );
>365if (ret)
>366goto fail_dput;
>367
>368if (autofs_type_trigger(sbi->type))
>369__managed_dentry_set_managed(root);
>370
>371root_inode->i_fop = _root_operations;
>372root_inode->i_op = _dir_inode_operations;
>373
>374/*
>375 * Success! Install the root dentry now to indicate
> completion.
>376 */
>377s->s_root = root;
>378return 0;
>379
>380/*
>381 * Failure ... clean up.
>382 */
>383fail_dput:
>384dput(root);
>385goto fail_free;
>386fail_iput:
>387iput(root_inode);
>388fail_ino:
>389autofs_free_ino(ino);
>390fail_free:
>391kfree(sbi);
>392s->s_fs_info = NULL;
>393return ret;
>394}
>395
> 
> ---
> 0-DAY kernel test infrastructureOpen Source 

Re: [PATCH 4/6] autofs - use struct for mount params

2018-11-13 Thread kbuild test robot
Hi Ian,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc2]
[cannot apply to next-20181113]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Ian-Kent/autofs-improve-ioctl-sbi-checks/20181114-021150
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   fs/autofs/inode.c: In function 'autofs_fill_super':
>> fs/autofs/inode.c:361:28: error: invalid type argument of '->' (have 'struct 
>> autofs_fs_params')
 root_inode->i_uid = params->uid;
   ^~
   fs/autofs/inode.c:362:28: error: invalid type argument of '->' (have 'struct 
autofs_fs_params')
 root_inode->i_gid = params->gid;
   ^~

vim +361 fs/autofs/inode.c

   313  
   314  int autofs_fill_super(struct super_block *s, void *data, int silent)
   315  {
   316  struct inode *root_inode;
   317  struct dentry *root;
   318  struct autofs_fs_params params;
   319  struct autofs_sb_info *sbi;
   320  struct autofs_info *ino;
   321  int ret = -EINVAL;
   322  
   323  sbi = autofs_alloc_sbi(s);
   324  if (!sbi)
   325  return -ENOMEM;
   326  
   327  pr_debug("starting up, sbi = %p\n", sbi);
   328  
   329  s->s_fs_info = sbi;
   330  s->s_blocksize = 1024;
   331  s->s_blocksize_bits = 10;
   332  s->s_magic = AUTOFS_SUPER_MAGIC;
   333  s->s_op = _sops;
   334  s->s_d_op = _dentry_operations;
   335  s->s_time_gran = 1;
   336  
   337  /*
   338   * Get the root inode and dentry, but defer checking for errors.
   339   */
   340  ino = autofs_new_ino(sbi);
   341  if (!ino) {
   342  ret = -ENOMEM;
   343  goto fail_free;
   344  }
   345  root_inode = autofs_get_inode(s, S_IFDIR | 0755);
   346  if (!root_inode) {
   347  ret = -ENOMEM;
   348  goto fail_ino;
   349  }
   350  root = d_make_root(root_inode);
   351  if (!root)
   352  goto fail_iput;
   353  
   354  root->d_fsdata = ino;
   355  
   356  memset(, 0, sizeof(struct autofs_fs_params));
   357  if (autofs_parse_options(data, )) {
   358  pr_err("called with bogus options\n");
   359  goto fail_dput;
   360  }
 > 361  root_inode->i_uid = params->uid;
   362  root_inode->i_gid = params->gid;
   363  
   364  ret = autofs_apply_sbi_options(sbi, );
   365  if (ret)
   366  goto fail_dput;
   367  
   368  if (autofs_type_trigger(sbi->type))
   369  __managed_dentry_set_managed(root);
   370  
   371  root_inode->i_fop = _root_operations;
   372  root_inode->i_op = _dir_inode_operations;
   373  
   374  /*
   375   * Success! Install the root dentry now to indicate completion.
   376   */
   377  s->s_root = root;
   378  return 0;
   379  
   380  /*
   381   * Failure ... clean up.
   382   */
   383  fail_dput:
   384  dput(root);
   385  goto fail_free;
   386  fail_iput:
   387  iput(root_inode);
   388  fail_ino:
   389  autofs_free_ino(ino);
   390  fail_free:
   391  kfree(sbi);
   392  s->s_fs_info = NULL;
   393  return ret;
   394  }
   395  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 4/6] autofs - use struct for mount params

2018-11-13 Thread kbuild test robot
Hi Ian,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc2]
[cannot apply to next-20181113]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Ian-Kent/autofs-improve-ioctl-sbi-checks/20181114-021150
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   fs/autofs/inode.c: In function 'autofs_fill_super':
>> fs/autofs/inode.c:361:28: error: invalid type argument of '->' (have 'struct 
>> autofs_fs_params')
 root_inode->i_uid = params->uid;
   ^~
   fs/autofs/inode.c:362:28: error: invalid type argument of '->' (have 'struct 
autofs_fs_params')
 root_inode->i_gid = params->gid;
   ^~

vim +361 fs/autofs/inode.c

   313  
   314  int autofs_fill_super(struct super_block *s, void *data, int silent)
   315  {
   316  struct inode *root_inode;
   317  struct dentry *root;
   318  struct autofs_fs_params params;
   319  struct autofs_sb_info *sbi;
   320  struct autofs_info *ino;
   321  int ret = -EINVAL;
   322  
   323  sbi = autofs_alloc_sbi(s);
   324  if (!sbi)
   325  return -ENOMEM;
   326  
   327  pr_debug("starting up, sbi = %p\n", sbi);
   328  
   329  s->s_fs_info = sbi;
   330  s->s_blocksize = 1024;
   331  s->s_blocksize_bits = 10;
   332  s->s_magic = AUTOFS_SUPER_MAGIC;
   333  s->s_op = _sops;
   334  s->s_d_op = _dentry_operations;
   335  s->s_time_gran = 1;
   336  
   337  /*
   338   * Get the root inode and dentry, but defer checking for errors.
   339   */
   340  ino = autofs_new_ino(sbi);
   341  if (!ino) {
   342  ret = -ENOMEM;
   343  goto fail_free;
   344  }
   345  root_inode = autofs_get_inode(s, S_IFDIR | 0755);
   346  if (!root_inode) {
   347  ret = -ENOMEM;
   348  goto fail_ino;
   349  }
   350  root = d_make_root(root_inode);
   351  if (!root)
   352  goto fail_iput;
   353  
   354  root->d_fsdata = ino;
   355  
   356  memset(, 0, sizeof(struct autofs_fs_params));
   357  if (autofs_parse_options(data, )) {
   358  pr_err("called with bogus options\n");
   359  goto fail_dput;
   360  }
 > 361  root_inode->i_uid = params->uid;
   362  root_inode->i_gid = params->gid;
   363  
   364  ret = autofs_apply_sbi_options(sbi, );
   365  if (ret)
   366  goto fail_dput;
   367  
   368  if (autofs_type_trigger(sbi->type))
   369  __managed_dentry_set_managed(root);
   370  
   371  root_inode->i_fop = _root_operations;
   372  root_inode->i_op = _dir_inode_operations;
   373  
   374  /*
   375   * Success! Install the root dentry now to indicate completion.
   376   */
   377  s->s_root = root;
   378  return 0;
   379  
   380  /*
   381   * Failure ... clean up.
   382   */
   383  fail_dput:
   384  dput(root);
   385  goto fail_free;
   386  fail_iput:
   387  iput(root_inode);
   388  fail_ino:
   389  autofs_free_ino(ino);
   390  fail_free:
   391  kfree(sbi);
   392  s->s_fs_info = NULL;
   393  return ret;
   394  }
   395  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip