zbd: avoid Coverity defect report
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 9 Jun 2023 23:59:14 +0000 (08:59 +0900)
committerJens Axboe <axboe@kernel.dk>
Sat, 10 Jun 2023 00:04:45 +0000 (18:04 -0600)
commit62ac66490f5077e5fca1bd5b49165147cafc5a0d
tree32d0552964e90abc206cac3390e85c3ba28b28a7
parentedaee5b96fd87c3c5fe7f64ec917a175cd9237fc
zbd: avoid Coverity defect report

Coverity reported a defect related to the local variable "in_flight":

    Using an unreliable value of "in_flight" inside the second locked
    section. If the data that "in_flight" depends on was changed by
    another thread, this use might be incorrect.

The variable "in_flight" is thread local and other threads can not
change its value. Then the report should be false-positive. Just to
suppress the report, change reference timing of the valuable.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20230609235914.1376567-1-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
zbd.c