lkml.org 
[lkml]   [2018]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/6] autofs - add strictexpire mount option
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-20181115]
[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: x86_64-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=x86_64

All error/warnings (new ones prefixed by >>):

>> fs/autofs/init.c:19:25: warning: symbol 'autofs_fs_type' was not declared. Should it be static?
--
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
>> fs/autofs/inode.c:372:35: error: cannot dereference this type
fs/autofs/inode.c:373:35: error: cannot dereference this type
>> fs/autofs/inode.c:372:35: warning: unknown expression (8 46)
fs/autofs/inode.c:373:35: warning: unknown expression (8 46)
fs/autofs/inode.c: In function 'autofs_fill_super':
fs/autofs/inode.c:372:28: error: invalid type argument of '->' (have 'struct autofs_fs_params')
root_inode->i_uid = params->uid;
^~
fs/autofs/inode.c:373:28: error: invalid type argument of '->' (have 'struct autofs_fs_params')
root_inode->i_gid = params->gid;
^~

vim +372 fs/autofs/inode.c

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

:::::: The code at line 372 was first introduced by commit
:::::: f4507adde6ebc94c273ccc2c18f2afb0fea20cf9 autofs - use struct for mount params

:::::: TO: Ian Kent <raven@themaw.net>
:::::: CC: 0day robot <lkp@intel.com>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2018-11-15 14:32    [W:0.109 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site