]> git.baikalelectronics.ru Git - kernel.git/commit
dm zoned: remove duplicate nr_rnd_zones increase in dmz_init_zone()
authorBob Liu <bob.liu@oracle.com>
Tue, 24 Mar 2020 13:22:45 +0000 (21:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 08:50:23 +0000 (10:50 +0200)
commit1944172db084e7ff28326ee26bfa2604effd4f0a
treed888195e27e67ac2226678f0396ece6761d7142d
parent86869c3059f39dc31c44ca81f8b7ac0c254b917d
dm zoned: remove duplicate nr_rnd_zones increase in dmz_init_zone()

[ Upstream commit d1b6dd6fb9bb763259b2a19004f0816ebfdafea8 ]

zmd->nr_rnd_zones was increased twice by mistake. The other place it
is increased in dmz_init_zone() is the only one needed:

1131                 zmd->nr_useable_zones++;
1132                 if (dmz_is_rnd(zone)) {
1133                         zmd->nr_rnd_zones++;
^^^
Fixes: a7416f809f04 ("dm zoned: drive-managed zoned block device target")
Cc: stable@vger.kernel.org
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-zoned-metadata.c