btrfs-progs: Simplify memory allocation for enumerate_dead_subvols
authorZhao Lei <zhaolei@cn.fujitsu.com>
Wed, 26 Aug 2015 14:03:37 +0000 (22:03 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 1 Sep 2015 12:02:49 +0000 (14:02 +0200)
commit601c5e1b234fa13bbbed89bce3201f81340ff15d
treed9b744a43f1e9345e3e8cdbed35c30fd38e8afb0
parent298746b9583cf9b70efa5de03a366076e45cfcff
btrfs-progs: Simplify memory allocation for enumerate_dead_subvols

No need prepare memory for enumerate_dead_subvols() in caller, and pass
additional argument for allocated length.

Just do every thing inside enumerate_dead_subvols(), it will not
increase malloc count, but make code simple.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-subvolume.c