Re: [PATCH 2/4] btrfs-progs: Simplify memory allocation for enumerate_dead_subvols

2015-08-31 Thread David Sterba
On Wed, Aug 26, 2015 at 10:03:37PM +0800, Zhao Lei wrote: > 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. > > S

[PATCH 2/4] btrfs-progs: Simplify memory allocation for enumerate_dead_subvols

2015-08-26 Thread Zhao Lei
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 --- cmds-subvolume.c | 17 ++--- 1