Re: [PATCH 2/6] shmem: make shmem_get_inode() return ERR_PTR instead of NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.3-rc5]
[cannot apply to akpm-mm/mm-everything next-20230403]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/cem-kernel-org/shmem-make-shmem_inode_acct_block-return-error/20230403-165022
patch link:    https://lore.kernel.org/r/20230403084759.884681-3-cem%40kernel.org
patch subject: [PATCH 2/6] shmem: make shmem_get_inode() return ERR_PTR instead of NULL
config: arm-randconfig-r046-20230403 (https://download.01.org/0day-ci/archive/20230404/202304040420.J4BUN9E6-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/intel-lab-lkp/linux/commit/98aa926ee22a768f6a2dc8b0b897d018fc47497e
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review cem-kernel-org/shmem-make-shmem_inode_acct_block-return-error/20230403-165022
        git checkout 98aa926ee22a768f6a2dc8b0b897d018fc47497e
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202304040420.J4BUN9E6-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> mm/shmem.c:4261:29: error: too many arguments to function call, expected 5, have 6
                                   S_IFREG | S_IRWXUGO, 0, flags);
                                                           ^~~~~
   mm/shmem.c:4231:29: note: 'shmem_get_inode' declared here
   static inline struct inode *shmem_get_inode(struct super_block *sb, struct inode *dir,
                               ^
   1 error generated.


vim +4261 mm/shmem.c

^1da177e4c3f41 Linus Torvalds    2005-04-16  4241  
703321b60b605b Matthew Auld      2017-10-06  4242  static struct file *__shmem_file_setup(struct vfsmount *mnt, const char *name, loff_t size,
c7277090927a5e Eric Paris        2013-12-02  4243  				       unsigned long flags, unsigned int i_flags)
^1da177e4c3f41 Linus Torvalds    2005-04-16  4244  {
^1da177e4c3f41 Linus Torvalds    2005-04-16  4245  	struct inode *inode;
93dec2da7b2349 Al Viro           2018-07-08  4246  	struct file *res;
^1da177e4c3f41 Linus Torvalds    2005-04-16  4247  
703321b60b605b Matthew Auld      2017-10-06  4248  	if (IS_ERR(mnt))
703321b60b605b Matthew Auld      2017-10-06  4249  		return ERR_CAST(mnt);
^1da177e4c3f41 Linus Torvalds    2005-04-16  4250  
285b2c4fdd69ea Hugh Dickins      2011-08-03  4251  	if (size < 0 || size > MAX_LFS_FILESIZE)
^1da177e4c3f41 Linus Torvalds    2005-04-16  4252  		return ERR_PTR(-EINVAL);
^1da177e4c3f41 Linus Torvalds    2005-04-16  4253  
^1da177e4c3f41 Linus Torvalds    2005-04-16  4254  	if (shmem_acct_size(flags, size))
^1da177e4c3f41 Linus Torvalds    2005-04-16  4255  		return ERR_PTR(-ENOMEM);
^1da177e4c3f41 Linus Torvalds    2005-04-16  4256  
7a80e5b8c6fa7d Giuseppe Scrivano 2023-01-20  4257  	if (is_idmapped_mnt(mnt))
7a80e5b8c6fa7d Giuseppe Scrivano 2023-01-20  4258  		return ERR_PTR(-EINVAL);
7a80e5b8c6fa7d Giuseppe Scrivano 2023-01-20  4259  
7a80e5b8c6fa7d Giuseppe Scrivano 2023-01-20  4260  	inode = shmem_get_inode(&nop_mnt_idmap, mnt->mnt_sb, NULL,
7a80e5b8c6fa7d Giuseppe Scrivano 2023-01-20 @4261  				S_IFREG | S_IRWXUGO, 0, flags);
98aa926ee22a76 Lukas Czerner     2023-04-03  4262  
98aa926ee22a76 Lukas Czerner     2023-04-03  4263  	if (IS_ERR(inode)) {
dac2d1f6cbfe3f Al Viro           2018-06-09  4264  		shmem_unacct_size(flags, size);
98aa926ee22a76 Lukas Czerner     2023-04-03  4265  		return ERR_CAST(inode);
dac2d1f6cbfe3f Al Viro           2018-06-09  4266  	}
c7277090927a5e Eric Paris        2013-12-02  4267  	inode->i_flags |= i_flags;
^1da177e4c3f41 Linus Torvalds    2005-04-16  4268  	inode->i_size = size;
6d6b77f163c7ea Miklos Szeredi    2011-10-28  4269  	clear_nlink(inode);	/* It is unlinked */
26567cdbbf1a6b Al Viro           2013-03-01  4270  	res = ERR_PTR(ramfs_nommu_expand_for_mapping(inode, size));
93dec2da7b2349 Al Viro           2018-07-08  4271  	if (!IS_ERR(res))
93dec2da7b2349 Al Viro           2018-07-08  4272  		res = alloc_file_pseudo(inode, mnt, name, O_RDWR,
4b42af81f0d7f9 Al Viro           2009-08-05  4273  				&shmem_file_operations);
6b4d0b2793337c Al Viro           2013-02-14  4274  	if (IS_ERR(res))
93dec2da7b2349 Al Viro           2018-07-08  4275  		iput(inode);
6b4d0b2793337c Al Viro           2013-02-14  4276  	return res;
^1da177e4c3f41 Linus Torvalds    2005-04-16  4277  }
c7277090927a5e Eric Paris        2013-12-02  4278  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux