block/nbd: safer transition to receiving request
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Thu, 10 Jun 2021 10:08:02 +0000 (13:08 +0300)
committerEric Blake <eblake@redhat.com>
Fri, 18 Jun 2021 17:21:22 +0000 (12:21 -0500)
commitbbfb7c2f350262f893642433dea66352fc168295
tree3e97e429acbe46ffac86019a601265952154c8c8
parent91e0998f5ab88e575b5d1b9bc55e0d179b9224f1
block/nbd: safer transition to receiving request

req->receiving is a flag of request being in one concrete yield point
in nbd_co_do_receive_one_chunk().

Such kind of boolean flag is always better to unset before scheduling
the coroutine, to avoid double scheduling. So, let's be more careful.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210610100802.5888-33-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
block/nbd.c