ubifs: ubifs_dump_node: Dump all branches of the index node
authorZhihao Cheng <chengzhihao1@huawei.com>
Tue, 16 Jun 2020 07:11:46 +0000 (15:11 +0800)
committerRichard Weinberger <richard@nod.at>
Sun, 13 Dec 2020 21:12:42 +0000 (22:12 +0100)
An index node can have up to c->fanout branches, all branches should be
displayed while dumping index node.

Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/debug.c

index 8b49ece..1bbb9fe 100644 (file)
@@ -537,7 +537,7 @@ void ubifs_dump_node(const struct ubifs_info *c, const void *node, int node_len)
                pr_err("\tlevel          %d\n", (int)le16_to_cpu(idx->level));
                pr_err("\tBranches:\n");
 
-               for (i = 0; i < n && i < c->fanout - 1; i++) {
+               for (i = 0; i < n && i < c->fanout; i++) {
                        const struct ubifs_branch *br;
 
                        br = ubifs_idx_branch(c, idx, i);