]> git.baikalelectronics.ru Git - kernel.git/commit
dm zoned: return NULL if dmz_get_zone_for_reclaim() fails to find a zone
authorHannes Reinecke <hare@suse.de>
Tue, 19 May 2020 08:14:19 +0000 (10:14 +0200)
committerMike Snitzer <snitzer@redhat.com>
Wed, 20 May 2020 21:09:49 +0000 (17:09 -0400)
commit3dd8bebb294a6bee8e88af7e6918cc135fd20f7b
tree8787113bed64aa4ac4aac191cc583cfd02c574b6
parent0c003cec484a73e7a14aef9d6a6917ff30d9e23d
dm zoned: return NULL if dmz_get_zone_for_reclaim() fails to find a zone

The only case where dmz_get_zone_for_reclaim() cannot return a zone is
if the respective lists are empty. So we should just return a simple
NULL value here as we really don't have an error code which would make
sense.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-zoned-metadata.c
drivers/md/dm-zoned-reclaim.c