[hch-xfs:xfs-crc 53/59] fs/xfs/xfs_ioend.c:251 xfs_ioend_submit_read_sync() warn: bitwise AND condition is false here

kernel test robot <[email protected]> Sun, 26 Jul 2026 23:12:02 +0800
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
BCC: [email protected]
CC: [email protected]
TO: Christoph Hellwig <[email protected]>

tree:   git://git.infradead.org/users/hch/xfs xfs-crc
head:   10c7aa6f2c85085eec34737be592d6ae69583782
commit: dc5c730a1638c980c34768ffb41f195071d7e662 [53/59] xfs: add support for writing with data checksums
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: arm64-randconfig-r073-20260726 (https://download.01.org/0day-ci/archive/20260726/[email protected]/config)
compiler: aarch64-linux-gcc (GCC) 13.4.0
smatch: v0.5.0-9187-g5189e3fb

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

New smatch warnings:
fs/xfs/xfs_ioend.c:251 xfs_ioend_submit_read_sync() warn: bitwise AND condition is false here

Old smatch warnings:
fs/xfs/xfs_ioend.c:99 xfs_dio_bounce_end_io() warn: bitwise AND condition is false here
fs/xfs/xfs_ioend.c:111 xfs_bounce_submit_ioend() warn: bitwise AND condition is false here
fs/xfs/xfs_ioend.c:144 xfs_read_bounce_and_resubmit() warn: bitwise AND condition is false here
fs/xfs/xfs_ioend.c:175 xfs_end_io_read() warn: bitwise AND condition is false here
fs/xfs/xfs_ioend.c:227 xfs_ioend_submit_read() warn: bitwise AND condition is false here

vim +251 fs/xfs/xfs_ioend.c

d27e81cfb6f345 Christoph Hellwig 2026-07-17  233  
dc5c730a1638c9 Christoph Hellwig 2026-07-19  234  int
dc5c730a1638c9 Christoph Hellwig 2026-07-19  235  xfs_ioend_submit_read_sync(
dc5c730a1638c9 Christoph Hellwig 2026-07-19  236  	struct bio		*bio,
dc5c730a1638c9 Christoph Hellwig 2026-07-19  237  	struct inode		*inode,
dc5c730a1638c9 Christoph Hellwig 2026-07-19  238  	loff_t			file_offset,
dc5c730a1638c9 Christoph Hellwig 2026-07-19  239  	u16			ioend_flags)
dc5c730a1638c9 Christoph Hellwig 2026-07-19  240  {
dc5c730a1638c9 Christoph Hellwig 2026-07-19  241  	struct xfs_inode	*ip = XFS_I(inode);
dc5c730a1638c9 Christoph Hellwig 2026-07-19  242  	struct iomap_ioend	*ioend;
dc5c730a1638c9 Christoph Hellwig 2026-07-19  243  	struct bvec_iter	saved_iter;
dc5c730a1638c9 Christoph Hellwig 2026-07-19  244  	int			error;
dc5c730a1638c9 Christoph Hellwig 2026-07-19  245  
dc5c730a1638c9 Christoph Hellwig 2026-07-19  246  	ASSERT(!(ioend_flags & IOMAP_IOEND_DIRECT));
dc5c730a1638c9 Christoph Hellwig 2026-07-19  247  
dc5c730a1638c9 Christoph Hellwig 2026-07-19  248  	ioend = iomap_init_ioend(inode, bio, file_offset, ioend_flags);
dc5c730a1638c9 Christoph Hellwig 2026-07-19  249  	if (xfs_is_rtcsum_inode(ip) && !xfs_rtcsum_prepare_read(ioend))
dc5c730a1638c9 Christoph Hellwig 2026-07-19  250  		return blk_status_to_errno(bio->bi_status);
dc5c730a1638c9 Christoph Hellwig 2026-07-19 @251  	if (ioend_flags & IOMAP_IOEND_INTEGRITY)
dc5c730a1638c9 Christoph Hellwig 2026-07-19  252  		fs_bio_integrity_alloc(bio);
dc5c730a1638c9 Christoph Hellwig 2026-07-19  253  	error = submit_bio_wait(bio);
dc5c730a1638c9 Christoph Hellwig 2026-07-19  254  	if (bio_integrity(bio)) {
dc5c730a1638c9 Christoph Hellwig 2026-07-19  255  		if (!error)
dc5c730a1638c9 Christoph Hellwig 2026-07-19  256  			error = fs_bio_integrity_verify(bio, &saved_iter);
dc5c730a1638c9 Christoph Hellwig 2026-07-19  257  		fs_bio_integrity_free(bio);
dc5c730a1638c9 Christoph Hellwig 2026-07-19  258  	}
dc5c730a1638c9 Christoph Hellwig 2026-07-19  259  	if (xfs_is_rtcsum_inode(ip))
dc5c730a1638c9 Christoph Hellwig 2026-07-19  260  		error = xfs_rtcsum_verify_ioend(ioend, error);
dc5c730a1638c9 Christoph Hellwig 2026-07-19  261  	return error;
dc5c730a1638c9 Christoph Hellwig 2026-07-19  262  }
dc5c730a1638c9 Christoph Hellwig 2026-07-19  263  

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