[PATCH -next] ubifs: Display the inode number when orphan twice happens

Zhihao Cheng chengzhihao1 at huawei.com
Tue Aug 20 23:44:41 PDT 2024


在 2024/8/21 14:30, Liu Mingrui 写道:
> 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 at huawei.com>
> ---
>   fs/ubifs/orphan.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Zhihao Cheng <chengzhihao1 at huawei.com>
> diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c
> index fb957d963ba6..5555dd740889 100644
> --- a/fs/ubifs/orphan.c
> +++ b/fs/ubifs/orphan.c
> @@ -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;
> 




More information about the linux-mtd mailing list