summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-10-30 22:21:11 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:45 -0400
commitd4bce63636ab81ca4aed03d6641ad70c8416e921 (patch)
tree6b106329357324c9d2102c1a9b186710efea8dbd /fs
parent2cb75179694a646e192247cd56b62cf375af3ae9 (diff)
bcachefs: Kill BCH_WRITE_JOURNAL_SEQ_PTR
Dead code, delete. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/data_update.c2
-rw-r--r--fs/bcachefs/io.c4
-rw-r--r--fs/bcachefs/io.h8
-rw-r--r--fs/bcachefs/io_types.h9
4 files changed, 4 insertions, 19 deletions
diff --git a/fs/bcachefs/data_update.c b/fs/bcachefs/data_update.c
index 927deb3943b5..658868048c22 100644
--- a/fs/bcachefs/data_update.c
+++ b/fs/bcachefs/data_update.c
@@ -226,7 +226,7 @@ int bch2_data_update_index_update(struct bch_write_op *op)
bch2_trans_update(&trans, &iter, insert,
BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE) ?:
bch2_trans_commit(&trans, &op->res,
- op_journal_seq(op),
+ &op->journal_seq,
BTREE_INSERT_NOFAIL|
m->data_opts.btree_insert_flags);
if (!ret) {
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c
index 616407fa08ae..97427487aa79 100644
--- a/fs/bcachefs/io.c
+++ b/fs/bcachefs/io.c
@@ -507,7 +507,7 @@ static int bch2_write_index_default(struct bch_write_op *op)
BTREE_ITER_SLOTS|BTREE_ITER_INTENT);
ret = bch2_extent_update(&trans, inum, &iter, sk.k,
- &op->res, op_journal_seq(op),
+ &op->res, &op->journal_seq,
op->new_i_size, &op->i_sectors_delta,
op->flags & BCH_WRITE_CHECK_ENOSPC);
bch2_trans_iter_exit(&trans, &iter);
@@ -776,7 +776,7 @@ unlock:
__bch2_write(op);
} else if (!op->error && (op->flags & BCH_WRITE_FLUSH)) {
bch2_journal_flush_seq_async(&op->c->journal,
- *op_journal_seq(op),
+ op->journal_seq,
&op->cl);
continue_at(&op->cl, bch2_write_done, index_update_wq(op));
} else {
diff --git a/fs/bcachefs/io.h b/fs/bcachefs/io.h
index a3505762b68d..730c7a5bcce8 100644
--- a/fs/bcachefs/io.h
+++ b/fs/bcachefs/io.h
@@ -40,7 +40,6 @@ enum bch_write_flags {
__BCH_WRITE_FROM_INTERNAL,
__BCH_WRITE_CHECK_ENOSPC,
__BCH_WRITE_MOVE,
- __BCH_WRITE_JOURNAL_SEQ_PTR,
__BCH_WRITE_IN_WORKER,
__BCH_WRITE_DONE,
__BCH_WRITE_IO_ERROR,
@@ -59,17 +58,10 @@ enum bch_write_flags {
#define BCH_WRITE_MOVE (1U << __BCH_WRITE_MOVE)
/* Internal: */
-#define BCH_WRITE_JOURNAL_SEQ_PTR (1U << __BCH_WRITE_JOURNAL_SEQ_PTR)
#define BCH_WRITE_IN_WORKER (1U << __BCH_WRITE_IN_WORKER)
#define BCH_WRITE_DONE (1U << __BCH_WRITE_DONE)
#define BCH_WRITE_IO_ERROR (1U << __BCH_WRITE_IO_ERROR)
-static inline u64 *op_journal_seq(struct bch_write_op *op)
-{
- return (op->flags & BCH_WRITE_JOURNAL_SEQ_PTR)
- ? op->journal_seq_p : &op->journal_seq;
-}
-
static inline struct workqueue_struct *index_update_wq(struct bch_write_op *op)
{
return op->alloc_reserve == RESERVE_movinggc
diff --git a/fs/bcachefs/io_types.h b/fs/bcachefs/io_types.h
index c316a39d381a..685fb1183399 100644
--- a/fs/bcachefs/io_types.h
+++ b/fs/bcachefs/io_types.h
@@ -142,14 +142,7 @@ struct bch_write_op {
struct open_buckets open_buckets;
- /*
- * If caller wants to flush but hasn't passed us a journal_seq ptr, we
- * still need to stash the journal_seq somewhere:
- */
- union {
- u64 *journal_seq_p;
- u64 journal_seq;
- };
+ u64 journal_seq;
u64 new_i_size;
s64 i_sectors_delta;