summaryrefslogtreecommitdiff
path: root/zbd.c
diff options
context:
space:
mode:
authorDmitry Fomichev <dmitry.fomichev@wdc.com>2021-01-30 12:35:24 +0900
committerJens Axboe <axboe@kernel.dk>2021-01-29 22:06:49 -0700
commit2ef3c1b02473a14bf7b8b52e28d0cdded9c5cc9a (patch)
tree5c252b4d6a02e2357c2f63d1155658402a7db0d9 /zbd.c
parent1e3d6e033edb32263806ad20f6644c70350b61eb (diff)
downloadfio-2ef3c1b02473a14bf7b8b52e28d0cdded9c5cc9a.tar.gz
fio-2ef3c1b02473a14bf7b8b52e28d0cdded9c5cc9a.tar.bz2
zbd: relocate Coverity annotation
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>
Diffstat (limited to 'zbd.c')
-rw-r--r--zbd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/zbd.c b/zbd.c
index 4710645d..6a26fe10 100644
--- a/zbd.c
+++ b/zbd.c
@@ -1620,12 +1620,6 @@ enum io_u_action zbd_adjust_block(struct thread_data *td, struct io_u *io_u)
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;
}
/*
@@ -1786,6 +1780,12 @@ 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: