Commit 4e95876e authored by Richard Weinberger's avatar Richard Weinberger Committed by Xie XiuQi
Browse files

mtd: core: Fix refcounting for unpartitioned MTDs



stable inclusion
from stable-5.10.4
commit d5e3fc275ea1f0f67f3b713cc866eb3248ae4080
bugzilla: 46903

--------------------------------

commit 1ca71415 upstream.

Apply changes to usecount also to the master partition.
Otherwise we have no refcounting at all if an MTD has no partitions.

Cc: stable@vger.kernel.org
Fixes: 46b5889c ("mtd: implement proper partition handling")
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20201206202220.27290-1-richard@nod.at


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent 1d42e44e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment