* [PATCH -next] dm btree: shadow_child leaves unchecked in split_two_into_three
@ 2021-06-01 10:02 ` Tong Tiangen
0 siblings, 0 replies; 2+ messages in thread
From: Tong Tiangen @ 2021-06-01 10:02 UTC (permalink / raw)
To: Alasdair Kergon, Mike Snitzer, dm-devel; +Cc: linux-kernel, Tong Tiangen
Function shadow_child() leaves variable 'r' unchecked in
split_two_into_three when parent_index not equals to 0.
It's also not coordinate with above relative codes.
Fixes: dee29bf9192b ("dm btree: improve btree residency")
Signed-off-by: Tong Tiangen <tongtiangen@huawei.com>
---
drivers/md/persistent-data/dm-btree.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/md/persistent-data/dm-btree.c b/drivers/md/persistent-data/dm-btree.c
index 3e5a90580427..0703ca7a7d9a 100644
--- a/drivers/md/persistent-data/dm-btree.c
+++ b/drivers/md/persistent-data/dm-btree.c
@@ -743,8 +743,10 @@ static int split_two_into_three(struct shadow_spine *s, unsigned parent_index,
return r;
} else {
middle_index = parent_index;
- r = shadow_child(s->info, vt, pn, parent_index - 1, &left);
right = shadow_current(s);
+ r = shadow_child(s->info, vt, pn, parent_index - 1, &left);
+ if (r)
+ return r;
}
r = new_block(s->info, &middle);
--
2.18.0.huawei.25
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [dm-devel] [PATCH -next] dm btree: shadow_child leaves unchecked in split_two_into_three
@ 2021-06-01 10:02 ` Tong Tiangen
0 siblings, 0 replies; 2+ messages in thread
From: Tong Tiangen @ 2021-06-01 10:02 UTC (permalink / raw)
To: Alasdair Kergon, Mike Snitzer, dm-devel; +Cc: Tong Tiangen, linux-kernel
Function shadow_child() leaves variable 'r' unchecked in
split_two_into_three when parent_index not equals to 0.
It's also not coordinate with above relative codes.
Fixes: dee29bf9192b ("dm btree: improve btree residency")
Signed-off-by: Tong Tiangen <tongtiangen@huawei.com>
---
drivers/md/persistent-data/dm-btree.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/md/persistent-data/dm-btree.c b/drivers/md/persistent-data/dm-btree.c
index 3e5a90580427..0703ca7a7d9a 100644
--- a/drivers/md/persistent-data/dm-btree.c
+++ b/drivers/md/persistent-data/dm-btree.c
@@ -743,8 +743,10 @@ static int split_two_into_three(struct shadow_spine *s, unsigned parent_index,
return r;
} else {
middle_index = parent_index;
- r = shadow_child(s->info, vt, pn, parent_index - 1, &left);
right = shadow_current(s);
+ r = shadow_child(s->info, vt, pn, parent_index - 1, &left);
+ if (r)
+ return r;
}
r = new_block(s->info, &middle);
--
2.18.0.huawei.25
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-02 8:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 10:02 [PATCH -next] dm btree: shadow_child leaves unchecked in split_two_into_three Tong Tiangen
2021-06-01 10:02 ` [dm-devel] " Tong Tiangen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.