[chao-linux:feature/dax 1/9] fs/f2fs/data.c:4197:27: error: passing argument 1 of 'f2fs_write_failed' from incompatible pointer type
From: kernel test robot
Date: Sun Aug 08 2021 - 13:50:04 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git feature/dax
head: fe9932d5af4ceade2736e4a3a8c245e05331c392
commit: 100c09383c079477b620703951db64d7faaf5911 [1/9] f2fs: support iomap operation
config: ia64-buildonly-randconfig-r002-20210809 (attached as .config)
compiler: ia64-linux-gcc (GCC) 10.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/commit/?id=100c09383c079477b620703951db64d7faaf5911
git remote add chao-linux https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git
git fetch --no-tags chao-linux feature/dax
git checkout 100c09383c079477b620703951db64d7faaf5911
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
fs/f2fs/data.c: In function 'f2fs_map_blocks':
fs/f2fs/data.c:1536:35: error: expected ')' before 'goto'
1536 | (map->m_flags & F2FS_MAP_NEW)
| ^
| )
1537 | goto sync_out;
| ~~~~
fs/f2fs/data.c:1535:6: note: to match this '('
1535 | if (flag == F2FS_GET_BLOCK_ZERO &&
| ^
fs/f2fs/data.c:1538:2: error: expected expression before '}' token
1538 | } else {
| ^
fs/f2fs/data.c: In function 'f2fs_iomap_end':
>> fs/f2fs/data.c:4197:27: error: passing argument 1 of 'f2fs_write_failed' from incompatible pointer type [-Werror=incompatible-pointer-types]
4197 | f2fs_write_failed(inode->i_mapping, offset + length,
| ~~~~~^~~~~~~~~~~
| |
| struct address_space *
fs/f2fs/data.c:3235:45: note: expected 'struct inode *' but argument is of type 'struct address_space *'
3235 | static void f2fs_write_failed(struct inode *inode, loff_t to, bool lock)
| ~~~~~~~~~~~~~~^~~~~
cc1: some warnings being treated as errors
vim +/f2fs_write_failed +4197 fs/f2fs/data.c
4181
4182 static int f2fs_iomap_end(struct inode *inode, loff_t offset, loff_t length,
4183 ssize_t written, unsigned int flags, struct iomap *iomap)
4184 {
4185 if (!(flags & IOMAP_WRITE) || (flags & IOMAP_FAULT))
4186 return 0;
4187
4188 if (offset + written > i_size_read(inode))
4189 f2fs_i_size_write(inode, offset + written);
4190
4191 if (iomap->offset + iomap->length >
4192 ALIGN(i_size_read(inode), F2FS_BLKSIZE)) {
4193 block_t written_blk = bytes_to_blks(inode, offset + written);
4194 block_t end_blk = bytes_to_blks(inode, offset + length);
4195
4196 if (written_blk < end_blk)
> 4197 f2fs_write_failed(inode->i_mapping, offset + length,
4198 false);
4199 }
4200
4201 f2fs_update_time(F2FS_I_SB(inode), REQ_TIME);
4202 return 0;
4203 }
4204
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip