Re: [PATCH] btrfs: cleanup a straight free-after-malloc branch for free-space-cache

2015-01-14 Thread Gui Hecheng
On Wed, 2015-01-14 at 16:22 +0100, David Sterba wrote: > On Wed, Jan 14, 2015 at 04:18:54PM +0800, Gui Hecheng wrote: > > Move the branch that is unrelated to the result of io_ctl_init() before > > the function call, so we can save a kmalloc() & kfree() pair in that > > branch. > > > > Signed-off-

Re: [PATCH] btrfs: cleanup a straight free-after-malloc branch for free-space-cache

2015-01-14 Thread David Sterba
On Wed, Jan 14, 2015 at 04:18:54PM +0800, Gui Hecheng wrote: > Move the branch that is unrelated to the result of io_ctl_init() before > the function call, so we can save a kmalloc() & kfree() pair in that > branch. > > Signed-off-by: Gui Hecheng > --- > fs/btrfs/free-space-cache.c | 17

[PATCH] btrfs: cleanup a straight free-after-malloc branch for free-space-cache

2015-01-14 Thread Gui Hecheng
Move the branch that is unrelated to the result of io_ctl_init() before the function call, so we can save a kmalloc() & kfree() pair in that branch. Signed-off-by: Gui Hecheng --- fs/btrfs/free-space-cache.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/fs