mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 03:19:35 +03:00
Linux: Cleanup unnecessary NULL check in __vdev_disk_physio()
zio is never NULL when given to the vdev. Coverity complained saying: "Either the check against null is unnecessary, or there may be a null pointer dereference." Reported-by: Coverity (CID-1466174) Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14263
This commit is contained in:
parent
56c6f293c0
commit
f1100863f7
@ -665,7 +665,7 @@ __vdev_disk_physio(struct block_device *bdev, zio_t *zio,
|
|||||||
retry:
|
retry:
|
||||||
dr = vdev_disk_dio_alloc(bio_count);
|
dr = vdev_disk_dio_alloc(bio_count);
|
||||||
|
|
||||||
if (zio && !(zio->io_flags & (ZIO_FLAG_IO_RETRY | ZIO_FLAG_TRYHARD)) &&
|
if (!(zio->io_flags & (ZIO_FLAG_IO_RETRY | ZIO_FLAG_TRYHARD)) &&
|
||||||
zio->io_vd->vdev_failfast == B_TRUE) {
|
zio->io_vd->vdev_failfast == B_TRUE) {
|
||||||
bio_set_flags_failfast(bdev, &flags, zfs_vdev_failfast_mask & 1,
|
bio_set_flags_failfast(bdev, &flags, zfs_vdev_failfast_mask & 1,
|
||||||
zfs_vdev_failfast_mask & 2, zfs_vdev_failfast_mask & 4);
|
zfs_vdev_failfast_mask & 2, zfs_vdev_failfast_mask & 4);
|
||||||
|
Loading…
Reference in New Issue
Block a user