summaryrefslogtreecommitdiff
path: root/fs/bcachefs/io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-12-25 21:14:49 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:20 -0400
commit57af63b286a532f425e425c0684eda6fb5f7c284 (patch)
treecc66ff46ae5f552dd8101c2353eae8e833e49ce0 /fs/bcachefs/io.c
parent04f0f77df2324e5a2c3d60df4acda7cbe464d38e (diff)
downloadlwn-57af63b286a532f425e425c0684eda6fb5f7c284.tar.gz
lwn-57af63b286a532f425e425c0684eda6fb5f7c284.zip
bcachefs: bch2_alloc_sectors_append_ptrs() now takes cached flag
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io.c')
-rw-r--r--fs/bcachefs/io.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c
index 649373acde73..d69e63e519bf 100644
--- a/fs/bcachefs/io.c
+++ b/fs/bcachefs/io.c
@@ -746,7 +746,6 @@ static void init_append_extent(struct bch_write_op *op,
struct bch_extent_crc_unpacked crc)
{
struct bkey_i_extent *e;
- struct bch_extent_ptr *ptr;
op->pos.offset += crc.uncompressed_size;
@@ -760,11 +759,8 @@ static void init_append_extent(struct bch_write_op *op,
crc.nonce)
bch2_extent_crc_append(&e->k_i, crc);
- bch2_alloc_sectors_append_ptrs(op->c, wp, &e->k_i, crc.compressed_size);
-
- if (op->flags & BCH_WRITE_CACHED)
- extent_for_each_ptr(extent_i_to_s(e), ptr)
- ptr->cached = true;
+ bch2_alloc_sectors_append_ptrs(op->c, wp, &e->k_i, crc.compressed_size,
+ op->flags & BCH_WRITE_CACHED);
bch2_keylist_push(&op->insert_keys);
}