We had the following code in push_node_left:

        x = min(y, x);
        if (x < y) {
                /* confusing comment here */
                ...
        }

That if's condition can't become true, so just kill the entire block. Plus:
no one will ever need to worry about the removed confusing comment.

Signed-off-by: Jan Schmidt <[email protected]>
---
 fs/btrfs/ctree.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index e801f22..0d2f4e5 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -1999,19 +1999,9 @@ static int push_node_left(struct btrfs_trans_handle 
*trans,
        if (push_items <= 0)
                return 1;
 
-       if (empty) {
+       if (empty)
                push_items = min(src_nritems, push_items);
-               if (push_items < src_nritems) {
-                       /* leave at least 8 pointers in the node if
-                        * we aren't going to empty it
-                        */
-                       if (src_nritems - push_items < 8) {
-                               if (push_items <= 8)
-                                       return 1;
-                               push_items -= 8;
-                       }
-               }
-       } else
+       else
                push_items = min(src_nritems - 8, push_items);
 
        copy_extent_buffer(dst, src,
-- 
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to