ubifs: Display the inode number when orphan twice happens
authorLiu Mingrui <liumingrui@huawei.com>
Wed, 21 Aug 2024 06:30:59 +0000 (06:30 +0000)
committerRichard Weinberger <richard@nod.at>
Thu, 14 Nov 2024 16:49:31 +0000 (17:49 +0100)
Display the inode number in error message when the same orphan inode
is added twice, which could provide more information for debugging.

Signed-off-by: Liu Mingrui <liumingrui@huawei.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/orphan.c

index fb957d963ba6c0edcb9a0a6eca2009309bbdb0da..5555dd740889479e34287949b0114efccf775a9a 100644 (file)
@@ -76,7 +76,7 @@ int ubifs_add_orphan(struct ubifs_info *c, ino_t inum)
                else if (inum > o->inum)
                        p = &(*p)->rb_right;
                else {
-                       ubifs_err(c, "orphaned twice");
+                       ubifs_err(c, "ino %lu orphaned twice", (unsigned long)inum);
                        spin_unlock(&c->orphan_lock);
                        kfree(orphan);
                        return -EINVAL;