[Bugfix][API-584]update ubi problem for add patch3 and delete patch 1 2

Change-Id: I5283cd172ac72a80a6fa10d1d912137b4e2f8f7f
diff --git a/src/kernel/linux/v4.19/fs/ubifs/lpt.c b/src/kernel/linux/v4.19/fs/ubifs/lpt.c
index 22ba82e..3139337 100644
--- a/src/kernel/linux/v4.19/fs/ubifs/lpt.c
+++ b/src/kernel/linux/v4.19/fs/ubifs/lpt.c
@@ -1334,11 +1334,6 @@
 	buf = vmalloc(c->ltab_sz);
 	if (!buf)
 		return -ENOMEM;
-	/*jb.qi change for ubi problem on 20221026 start*/
-	/* check the whole LEB */
-	ubifs_err(c, "check the LEB of ltab!\n");
-	ubifs_leb_read(c, c->ltab_lnum, c->sbuf, 0, c->leb_size, 1);
-	/*jb.qi change for ubi problem on 20221026 end*/
 	err = ubifs_leb_read(c, c->ltab_lnum, buf, c->ltab_offs, c->ltab_sz, 1);
 	if (err)
 		goto out;
diff --git a/src/kernel/linux/v4.19/fs/ubifs/recovery.c b/src/kernel/linux/v4.19/fs/ubifs/recovery.c
index 36107ee..abf4597 100644
--- a/src/kernel/linux/v4.19/fs/ubifs/recovery.c
+++ b/src/kernel/linux/v4.19/fs/ubifs/recovery.c
@@ -923,7 +923,7 @@
 static int recover_head(struct ubifs_info *c, int lnum, int offs, void *sbuf)
 {
 	int len = c->max_write_size, err;
-
+	bool forceclean = true; //jb.qi add for ubi problem on 20221129
 	if (offs + len > c->leb_size)
 		len = c->leb_size - offs;
 
@@ -932,8 +932,8 @@
 
 	/* Read at the head location and check it is empty flash */
 	err = ubifs_leb_read(c, lnum, sbuf, offs, len, 1);
-	if (err || !is_empty(sbuf, len)) {
-		ubifs_err(c, "cleaning head at %d:%d", lnum, offs); //jb.qi change for ubi problem on 20221026
+	if (err || !is_empty(sbuf, len) || forceclean) { //jb.qi add for ubi problem on 20221129
+		dbg_rcvry("cleaning head at %d:%d", lnum, offs);
 		if (offs == 0)
 			return ubifs_leb_unmap(c, lnum);
 		err = ubifs_leb_read(c, lnum, sbuf, 0, offs, 1);
@@ -968,12 +968,12 @@
 
 	ubifs_assert(c, !c->ro_mount || c->remounting_rw);
 
-	ubifs_err(c, "checking index head at %d:%d", c->ihead_lnum, c->ihead_offs);//jb.qi change for ubi problem on 20221026
+	dbg_rcvry("checking index head at %d:%d", c->ihead_lnum, c->ihead_offs);
 	err = recover_head(c, c->ihead_lnum, c->ihead_offs, sbuf);
 	if (err)
 		return err;
 
-	ubifs_err(c, "checking LPT head at %d:%d", c->nhead_lnum, c->nhead_offs);//jb.qi change for ubi problem on 20221026
+	dbg_rcvry("checking LPT head at %d:%d", c->nhead_lnum, c->nhead_offs);
 
 	return recover_head(c, c->nhead_lnum, c->nhead_offs, sbuf);
 }