[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1417349070-8894-2-git-send-email-richard@nod.at>
Date: Sun, 30 Nov 2014 13:04:25 +0100
From: Richard Weinberger <richard@....at>
To: dedekind1@...il.com
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
Richard Weinberger <richard@....at>
Subject: [PATCH 1/6] UBI: Fastmap: Fix leb_count unbalance
If a LEB is unmapped we have to decrement leb_count as well.
Signed-off-by: Richard Weinberger <richard@....at>
---
drivers/mtd/ubi/fastmap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 3d913f5..5db41a5 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -362,6 +362,7 @@ static void unmap_peb(struct ubi_attach_info *ai, int pnum)
aeb = rb_entry(node2, struct ubi_ainf_peb, u.rb);
if (aeb->pnum == pnum) {
rb_erase(&aeb->u.rb, &av->root);
+ av->leb_count--;
kmem_cache_free(ai->aeb_slab_cache, aeb);
return;
}
--
1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists