dm thin metadata: Remove unused local variable when create thin and snap
authorHuaisheng Ye <yehs1@lenovo.com>
Tue, 15 Sep 2020 08:56:08 +0000 (16:56 +0800)
committerMike Snitzer <snitzer@redhat.com>
Tue, 29 Sep 2020 20:33:11 +0000 (16:33 -0400)
commit399c9bdbd6500254895bdbb574a4acbb860cda41
tree4effef942c2e9ace98ed1e13bd89565477f74561
parentf0e90b6c663a7e3b4736cb318c6c7c589f152c28
dm thin metadata: Remove unused local variable when create thin and snap

The local variable disk details is not used during the creating of thin & snap
devices. Remove them from dm-thin-metadata, and add pointer validity check for
pointer value in btree_lookup_raw. Skip memory copy when the caller doesn't need
the value.

Signed-off-by: Huaisheng Ye <yehs1@lenovo.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-thin-metadata.c
drivers/md/persistent-data/dm-btree.c