diff options
author | Hannes Reinecke <hare@suse.de> | 2020-05-19 11:14:19 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2020-05-21 00:09:49 +0300 |
commit | 489dc0f06a5837f87482c0ce61d830d24e17082e (patch) | |
tree | 8787113bed64aa4ac4aac191cc583cfd02c574b6 /drivers/md/dm-zoned-metadata.c | |
parent | 42c689f671233371f5c8c1685ab77bd66c274932 (diff) | |
download | linux-489dc0f06a5837f87482c0ce61d830d24e17082e.tar.xz |
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>
Diffstat (limited to 'drivers/md/dm-zoned-metadata.c')
-rw-r--r-- | drivers/md/dm-zoned-metadata.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index fba690dd37f5..fa7bcb28e952 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers/md/dm-zoned-metadata.c @@ -1845,7 +1845,7 @@ static struct dm_zone *dmz_get_rnd_zone_for_reclaim(struct dmz_metadata *zmd) return dzone; } - return ERR_PTR(-EBUSY); + return NULL; } /* @@ -1865,7 +1865,7 @@ static struct dm_zone *dmz_get_seq_zone_for_reclaim(struct dmz_metadata *zmd) return zone; } - return ERR_PTR(-EBUSY); + return NULL; } /* |