projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87b0d8d
)
bcachefs: Fix bch2_extent_drop_ptrs() call
author
Kent Overstreet
<kent.overstreet@linux.dev>
Sat, 2 Dec 2023 07:43:58 +0000
(
02:43
-0500)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Mon, 4 Dec 2023 21:04:55 +0000
(16:04 -0500)
Also, make bch2_extent_drop_ptrs() safer, so it works with extents and
non-extents iterators.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/data_update.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/data_update.c
b/fs/bcachefs/data_update.c
index 71aa5e59787b8bc6dca216add572553363a44492..2418c528c5333b6e621df17e1579cd2205264e36 100644
(file)
--- a/
fs/bcachefs/data_update.c
+++ b/
fs/bcachefs/data_update.c
@@
-471,7
+471,7
@@
int bch2_extent_drop_ptrs(struct btree_trans *trans,
* we aren't using the extent overwrite path to delete, we're
* just using the normal key deletion path:
*/
- if (bkey_deleted(&n->k))
+ if (bkey_deleted(&n->k)
&& !(iter->flags & BTREE_ITER_IS_EXTENTS)
)
n->k.size = 0;
return bch2_trans_relock(trans) ?:
@@
-591,7
+591,7
@@
int bch2_data_update_init(struct btree_trans *trans,
m->data_opts.rewrite_ptrs = 0;
/* if iter == NULL, it's just a promote */
if (iter)
- ret = bch2_extent_drop_ptrs(trans, iter, k, data_opts);
+ ret = bch2_extent_drop_ptrs(trans, iter, k,
m->
data_opts);
goto done;
}