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: i386-randconfig-i1-201703 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   fs/ext4/inode.c: In function 'ext4_validate':
>> fs/ext4/inode.c:5388:3: warning: format '%lu' expects argument of type 'long 
>> unsigned int', but argument 6 has type 'unsigned int' [-Wformat=]
      EXT4_ERROR_INODE(inode, "bad nlink value: %lu", inode->i_nlink);
      ^

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

Reply via email to