summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-03-11 16:25:42 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2019-03-17 14:30:14 -0400
commitcaf2ff7d451802a77f1162ef908dd9b964da86c5 (patch)
tree5beede803c441417dddfc957c4be6dcd9576fa03
parent107caf0dbc0286972674bfcc6541a71a2d731b80 (diff)
bcachefs: drop btree_insert->did_work
-rw-r--r--fs/bcachefs/btree_update.h1
-rw-r--r--fs/bcachefs/btree_update_leaf.c10
2 files changed, 6 insertions, 5 deletions
diff --git a/fs/bcachefs/btree_update.h b/fs/bcachefs/btree_update.h
index f98024ed6699..7ff33d792bb3 100644
--- a/fs/bcachefs/btree_update.h
+++ b/fs/bcachefs/btree_update.h
@@ -29,7 +29,6 @@ struct btree_insert {
struct journal_preres journal_preres;
u64 *journal_seq;
unsigned flags;
- bool did_work;
unsigned short nr;
struct btree_insert_entry *entries;
diff --git a/fs/bcachefs/btree_update_leaf.c b/fs/bcachefs/btree_update_leaf.c
index ee9a1fb736df..198d52f0bb99 100644
--- a/fs/bcachefs/btree_update_leaf.c
+++ b/fs/bcachefs/btree_update_leaf.c
@@ -584,7 +584,6 @@ got_journal_res:
break;
}
}
- trans->did_work = true;
trans_for_each_entry(trans, i)
do_btree_insert_one(trans, i);
@@ -738,8 +737,7 @@ err:
* BTREE_INSERT_NOUNLOCK means don't unlock _after_ successful btree
* update; if we haven't done anything yet it doesn't apply
*/
- if (!trans->did_work)
- flags &= ~BTREE_INSERT_NOUNLOCK;
+ flags &= ~BTREE_INSERT_NOUNLOCK;
switch (ret) {
case BTREE_INSERT_BTREE_NODE_FULL:
@@ -755,8 +753,12 @@ err:
* XXX:
* split -> btree node merging (of parent node) might still drop
* locks when we're not passing it BTREE_INSERT_NOUNLOCK
+ *
+ * we don't want to pass BTREE_INSERT_NOUNLOCK to split as that
+ * will inhibit merging - but we don't have a reliable way yet
+ * (do we?) of checking if we dropped locks in this path
*/
- if (!ret && !trans->did_work)
+ if (!ret)
goto retry;
#endif