]> git.baikalelectronics.ru Git - kernel.git/commit
block/rnbd-clt: Check the return value of the function rtrs_clt_query
authorMd Haris Iqbal <haris.iqbal@cloud.ionos.com>
Wed, 28 Apr 2021 06:13:58 +0000 (08:13 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 3 May 2021 17:00:11 +0000 (11:00 -0600)
commit878fb2c5dba476b39f74b88a14d28742c43e02be
treec05aef9cf34a7ea1365ea3d04086ab13aa457916
parentd3b3c4ca706172a429868fdff09b07f82c214d18
block/rnbd-clt: Check the return value of the function rtrs_clt_query

In case none of the paths are in connected state, the function
rtrs_clt_query returns an error. In such a case, error out since the
values in the rtrs_attrs structure would be garbage.

Fixes: 626ef2d3f9112 ("block/rnbd: client: main functionality")
Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Reviewed-by: Guoqing Jiang <guoqing.jiang@ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Gioh Kim <gi-oh.kim@ionos.com>
Link: https://lore.kernel.org/r/20210428061359.206794-4-gi-oh.kim@ionos.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnbd/rnbd-clt.c