Re: [PATCH 2/2] ext4: add detection of i_nlink

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

 



Hi yi,

[auto build test WARNING on ext4/dev]
[also build test WARNING on v4.10-rc4 next-20170118]
[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/yi-zhang/vfs-add-detection-of-inode-validation/20170119-013142
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: x86_64-randconfig-s1-01190013 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   fs/ext4/inode.c: In function 'ext4_validate':
>> fs/ext4/inode.c:5388: warning: format '%lu' expects type 'long unsigned int', but argument 6 has type 'unsigned int'
   fs/ext4/inode.o: warning: objtool: ext4_inode_journal_mode()+0xc0: function has unreachable instruction

vim +5388 fs/ext4/inode.c

  5372		 * allocation is done, we will have i_blocks inconsistent with
  5373		 * on-disk file blocks.
  5374		 * We always keep i_blocks updated together with real
  5375		 * allocation. But to not confuse with user, stat
  5376		 * will return the blocks that include the delayed allocation
  5377		 * blocks for this file.
  5378		 */
  5379		delalloc_blocks = EXT4_C2B(EXT4_SB(inode->i_sb),
  5380					   EXT4_I(inode)->i_reserved_data_blocks);
  5381		stat->blocks += delalloc_blocks << (inode->i_sb->s_blocksize_bits - 9);
  5382		return 0;
  5383	}
  5384	
  5385	int ext4_validate(struct inode *inode)
  5386	{
  5387		if (inode->i_nlink == 0) {
> 5388			EXT4_ERROR_INODE(inode, "bad nlink value: %lu", inode->i_nlink);
  5389			return -EFSCORRUPTED;
  5390		}
  5391	
  5392		return 0;
  5393	}
  5394	
  5395	static int ext4_index_trans_blocks(struct inode *inode, int lblocks,
  5396					   int pextents)

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux