[PATCH 1/1] Remove unnecessary branching in free-space-tree.c

2017-05-17 Thread Sahil Kang
Both btrfs_create_free_space_tree and btrfs_clear_free_space_tree contain: if (ret) return ret; return 0; The if statement is only false when ret equals zero, and since we return zero in such cases, we can safely remove the branching. Signed-off-by: Sahil Kang --- fs/btrfs/free

[PATCH 0/1] Remove unnecessary branching in free-space-tree.c

2017-05-17 Thread Sahil Kang
Hi David, Will you merge this patch? It's a small change that removes an unneeded if statement. Sahil Kang (1): Remove unnecessary branching in free-space-tree.c fs/btrfs/free-space-tree.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) -- 2.1.4 -- To unsubscribe

Re: [PATCH] Tidy while loop in end_compressed_writeback

2017-05-02 Thread Sahil Kang
I didn't consider it before, but I agree with your point on explicitly handling the return value from find_get_pages_contig. Thanks for looking over it, Sahil Original Message From: David Sterba Sent: May 2, 2017 9:01:34 AM PDT To: Sahil Kang Cc: linux-btrfs@vger.kerne

Re: [PATCH] Tidy while loop in end_compressed_writeback

2017-04-26 Thread Sahil Kang
Hi Chris, Would you merge my patch below? It's a minor update to improve the loop's readability. Thanks, Sahil On 04/19/2017 05:43 AM, Sahil Kang wrote: Hi, This is my first patch so it's a minor code change. I think removing the early continue from the loop makes the fun

Re: [PATCH] Tidy while loop in end_compressed_writeback

2017-04-24 Thread Sahil Kang
Hi David, I think my previous email may have failed to send. Can you merge my patch below? It's a minor update that I think improves readability. Thanks, Sahil On 04/19/2017 05:43 AM, Sahil Kang wrote: Hi, This is my first patch so it's a minor code change. I think removing

[PATCH] Tidy while loop in end_compressed_writeback

2017-04-19 Thread Sahil Kang
00:00 2001 From: Sahil Kang Date: Wed, 19 Apr 2017 04:47:00 -0700 Subject: [PATCH] Tidy while loop in end_compressed_writeback Instead of continuing early in the loop when ret is 0, we can decrement/increment nr_pages/index by 1 at the ending. The for loop will not execute when ret is 0 anyway. Sig