mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 04:19:23 -04:00
bcachefs: Remove unnecessary peek_slot()
hash_lookup() used to return an errorcode, and a peek_slot() call was required to get the key it looked up. But we're adding fault injection for transaction restarts, so fix this old unconverted code. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
@@ -170,7 +170,7 @@ static int lookup_dirent_in_snapshot(struct btree_trans *trans,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
struct bkey_s_c_dirent d = bkey_s_c_to_dirent(bch2_btree_iter_peek_slot(&iter));
|
||||
struct bkey_s_c_dirent d = bkey_s_c_to_dirent(k);
|
||||
*target = le64_to_cpu(d.v->d_inum);
|
||||
*type = d.v->d_type;
|
||||
bch2_trans_iter_exit(trans, &iter);
|
||||
|
||||
Reference in New Issue
Block a user