]> git.ipfire.org Git - thirdparty/kernel/stable.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 14:12:10 +0000 (16:12 +0200)
commitc75a09d45da3fa05331d1066d2c13ba073c3489c
tree8df0162ec4947e997cbb01f2152a88e487c3c957
parente491666538b5405df2e3fa95e0af29cdabf5d81f
dm zoned: remove duplicate nr_rnd_zones increase in dmz_init_zone()

commit b8fdd090376a7a46d17db316638fe54b965c2fb0 upstream.

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: 3b1a94c88b79 ("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-zoned-metadata.c