rbd: mark the original request as done if stat request fails
authorIlya Dryomov <idryomov@gmail.com>
Tue, 13 Sep 2016 18:18:01 +0000 (20:18 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 3 Oct 2016 14:13:47 +0000 (16:13 +0200)
commitc2e82414884718ad6ec33a7528606cb07cf55cb4
tree6433dcfbff2879085b729f9fc93826cf3cc4fac3
parent058aa9919147da9f088a96982a19ea0864139dc8
rbd: mark the original request as done if stat request fails

If stat request fails with something other than -ENOENT (which just
means that we need to copyup), the original object request is never
marked as done and therefore never completed.  Fix this by moving the
mark done + complete snippet from rbd_img_obj_parent_read_full() into
rbd_img_obj_exists_callback().  The former remains covered, as the
latter is its only caller (through rbd_img_obj_request_submit()).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
drivers/block/rbd.c