aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/btree_trans_commit.c
diff options
context:
space:
mode:
authorKent Overstreet <[email protected]>2024-08-14 02:40:39 +0000
committerKent Overstreet <[email protected]>2024-08-14 02:56:50 +0000
commita24e6e7146e361aa0855cf8ee3b2e80b8eb692e3 (patch)
tree9635a2724eefac24fa77f924a00b09c97c8d0c27 /fs/bcachefs/btree_trans_commit.c
parentbcachefs: bcachefs_metadata_version_disk_accounting_v3 (diff)
downloadkernel-a24e6e7146e361aa0855cf8ee3b2e80b8eb692e3.tar.gz
kernel-a24e6e7146e361aa0855cf8ee3b2e80b8eb692e3.zip
bcachefs: delete faulty fastpath in bch2_btree_path_traverse_cached()
bch2_btree_path_traverse_cached() was previously checking if it could just relock the path, which is a common idiom in path traversal. However, it was using btree_node_relock(), not btree_path_relock(); btree_path_relock() only succeeds if the path was in state BTREE_ITER_NEED_RELOCK. If the path was in state BTREE_ITER_NEED_TRAVERSE a full traversal is needed; this led to a null ptr deref in bch2_btree_path_traverse_cached(). And the short circuit check here isn't needed, since it was already done in the main bch2_btree_path_traverse_one(). Signed-off-by: Kent Overstreet <[email protected]>
Diffstat (limited to 'fs/bcachefs/btree_trans_commit.c')
0 files changed, 0 insertions, 0 deletions