]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
Update bcachefs sources to 49c34dadca bcachefs: Switch bch2_btree_delete_range()...
authorKent Overstreet <kent.overstreet@gmail.com>
Thu, 11 Aug 2022 23:25:47 +0000 (19:25 -0400)
committerKent Overstreet <kent.overstreet@gmail.com>
Thu, 11 Aug 2022 23:25:47 +0000 (19:25 -0400)
.bcachefs_revision
libbcachefs/btree_iter.c

index 7f12b42887436adc2ec043c9d1fc3ae50c0fff8e..720981cad6708d59e8a369e1ab7fb12b919ad846 100644 (file)
@@ -1 +1 @@
-90a9c61e2bcf20935aebda1c0c8078ad0fff2475
+49c34dadcad9c33b1e8510b5543d60c40fa0bebd
index 946c462e84aa15282bd3d48ec1550c8febca42bf..04a613187b60bef13d27d670db90ba781f77755c 100644 (file)
@@ -1940,7 +1940,6 @@ struct btree_path *bch2_path_get(struct btree_trans *trans,
        struct btree_path *path, *path_pos = NULL;
        bool cached = flags & BTREE_ITER_CACHED;
        bool intent = flags & BTREE_ITER_INTENT;
-       bool have_dup = false;
        int i;
 
        BUG_ON(trans->restarted);
@@ -1948,24 +1947,14 @@ struct btree_path *bch2_path_get(struct btree_trans *trans,
        bch2_trans_verify_locks(trans);
 
        trans_for_each_path_inorder(trans, path, i) {
-               int cmp = __btree_path_cmp(path,
-                                          btree_id,
-                                          cached,
-                                          pos,
-                                          level);
-               if (cmp > 0)
+               if (__btree_path_cmp(path,
+                                    btree_id,
+                                    cached,
+                                    pos,
+                                    level) > 0)
                        break;
 
                path_pos = path;
-
-               if (cmp == 0) {
-                       if (path->ref || path->preserve) {
-                               path->preserve = true;
-                               have_dup = true;
-                       } else {
-                               break;
-                       }
-               }
        }
 
        if (path_pos &&
@@ -1996,7 +1985,7 @@ struct btree_path *bch2_path_get(struct btree_trans *trans,
                btree_trans_verify_sorted(trans);
        }
 
-       if (!(flags & BTREE_ITER_NOPRESERVE) && !have_dup)
+       if (!(flags & BTREE_ITER_NOPRESERVE))
                path->preserve = true;
 
        if (path->intent_ref)