The Coverity annotation added earlier to suppress a false positive
about missing unlock in zbd_adjust_block() didn't work because it
was placed not before the return statement, but earlier in the code.
Move the annotation to the right place to avoid the warning.
Reported-by: Bart Van Assche <bvanassche@acm.org>
Fixes:
8e4b2e55512f("zbd: don't unlock zone mutex after verify replay")
Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
case DDIR_READ:
if (td->runstate == TD_VERIFYING && td_write(td)) {
zb = zbd_replay_write_order(td, io_u, zb);
- /*
- * Since we return with the zone lock still held,
- * add an annotation to let Coverity know that it
- * is intentional.
- */
- /* coverity[missing_unlock] */
goto accept;
}
/*
assert(!io_u->zbd_put_io);
io_u->zbd_queue_io = zbd_queue_io;
io_u->zbd_put_io = zbd_put_io;
+ /*
+ * Since we return with the zone lock still held,
+ * add an annotation to let Coverity know that it
+ * is intentional.
+ */
+ /* coverity[missing_unlock] */
return io_u_accept;
eof: