mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] ubifs: remove wrong assertion
Date: Thu, 10 Dec 2020 10:21:48 +0100	[thread overview]
Message-ID: <20201210092148.18132-1-s.hauer@pengutronix.de> (raw)

In barebox copy_znode() doesn't make a copy of the znode, We are limited
to readonly support, so copy_znode() returns the original node.
tnc_delete() expects a znode to be dirty and has an assertion for this.
In a normal r/w implementation this is correct, but not in barebox, so
drop the assertion. Instead of removing it just comment it out to make
sure it won't be added again with the next ubifs kernel synchronisation.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 fs/ubifs/tnc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c
index 2d7327ad84..72f9b817d8 100644
--- a/fs/ubifs/tnc.c
+++ b/fs/ubifs/tnc.c
@@ -1935,7 +1935,12 @@ static int tnc_delete(struct ubifs_info *c, struct ubifs_znode *znode, int n)
 
 	do {
 		ubifs_assert(c, !ubifs_zn_obsolete(znode));
-		ubifs_assert(c, ubifs_zn_dirty(znode));
+		/*
+		 * This assertion is invalid in barebox due to the shortcuts we take
+		 * in our readonly implementation.
+		 *
+		 * ubifs_assert(c, ubifs_zn_dirty(znode));
+		 */
 
 		zp = znode->parent;
 		n = znode->iip;
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

                 reply	other threads:[~2020-12-10  9:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201210092148.18132-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox