[hch-xfs:xfs-crc 8/51] fs/iomap/direct-io.c:83 iomap_dio_submit_bio() warn: bitwise AND condition is false here

kernel test robot <[email protected]>
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:   ef3d55d014b3a800421b9dae3ac182577bfe2bd7
commit: 10ed5659b441417bfaebb7d80c6cbcb7b9e5d0a3 [8/51] iomap: move T10 PI handling for direct I/O into ->submit_io
:::::: branch date: 8 hours ago
:::::: commit date: 10 hours ago
config: nios2-randconfig-r071-20260718 (https://download.01.org/0day-ci/archive/20260718/[email protected]/config)
compiler: nios2-linux-gcc (GCC) 10.5.0
smatch: v0.5.0-9185-gbcc58b9c

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/iomap/direct-io.c:83 iomap_dio_submit_bio() warn: bitwise AND condition is false here
fs/xfs/xfs_file.c:729 xfs_dio_zoned_submit_io() warn: bitwise AND condition is false here

Old smatch warnings:
fs/iomap/internal.h:15 iomap_max_bio_size() warn: bitwise AND condition is false here
fs/xfs/xfs_file.c:239 xfs_dio_read_bounce_submit_io() warn: bitwise AND condition is false here

vim +83 fs/iomap/direct-io.c

908c54909ae72d Christoph Hellwig 2022-05-05  62  
a6d3d49587d10d Christoph Hellwig 2021-08-10  63  static void iomap_dio_submit_bio(const struct iomap_iter *iter,
a6d3d49587d10d Christoph Hellwig 2021-08-10  64  		struct iomap_dio *dio, struct bio *bio, loff_t pos)
db074436f42196 Darrick J. Wong   2019-07-15  65  {
daa99c5a3319e3 Jens Axboe        2023-07-20  66  	struct kiocb *iocb = dio->iocb;
daa99c5a3319e3 Jens Axboe        2023-07-20  67  
db074436f42196 Darrick J. Wong   2019-07-15  68  	atomic_inc(&dio->ref);
db074436f42196 Darrick J. Wong   2019-07-15  69  
9650b453a3d4b1 Ming Lei          2022-04-20  70  	/* Sync dio can't be polled reliably */
daa99c5a3319e3 Jens Axboe        2023-07-20  71  	if ((iocb->ki_flags & IOCB_HIPRI) && !is_sync_kiocb(iocb)) {
47f28b493daf90 Christoph Hellwig 2026-05-18  72  		bio->bi_opf |= REQ_POLLED;
daa99c5a3319e3 Jens Axboe        2023-07-20  73  		WRITE_ONCE(iocb->private, bio);
3e08773c3841e9 Christoph Hellwig 2021-10-12  74  	}
db074436f42196 Darrick J. Wong   2019-07-15  75  
034c29fb3e7c11 Christoph Hellwig 2025-02-06  76  	if (dio->dops && dio->dops->submit_io) {
3e08773c3841e9 Christoph Hellwig 2021-10-12  77  		dio->dops->submit_io(iter, bio, pos);
10ed5659b44141 Christoph Hellwig 2026-07-07  78  		return;
10ed5659b44141 Christoph Hellwig 2026-07-07  79  	}
10ed5659b44141 Christoph Hellwig 2026-07-07  80  
034c29fb3e7c11 Christoph Hellwig 2025-02-06  81  	WARN_ON_ONCE(iter->iomap.flags & IOMAP_F_ANON_WRITE);
10ed5659b44141 Christoph Hellwig 2026-07-07  82  
10ed5659b44141 Christoph Hellwig 2026-07-07 @83  	if (iter->iomap.flags & IOMAP_F_INTEGRITY) {
10ed5659b44141 Christoph Hellwig 2026-07-07  84  		if (dio->flags & IOMAP_DIO_WRITE)
10ed5659b44141 Christoph Hellwig 2026-07-07  85  			fs_bio_integrity_generate(bio);
10ed5659b44141 Christoph Hellwig 2026-07-07  86  		else
10ed5659b44141 Christoph Hellwig 2026-07-07  87  			fs_bio_integrity_alloc(bio);
db074436f42196 Darrick J. Wong   2019-07-15  88  	}
10ed5659b44141 Christoph Hellwig 2026-07-07  89  
10ed5659b44141 Christoph Hellwig 2026-07-07  90  	blk_crypto_submit_bio(bio);
034c29fb3e7c11 Christoph Hellwig 2025-02-06  91  }
db074436f42196 Darrick J. Wong   2019-07-15  92  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.