diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-07 23:16:49 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-09 00:29:17 +0300 |
commit | ac01928b8e9688aca3c23134d4c889c4839c360a (patch) | |
tree | 3a2e40310622dfcf9cc913cb3b167d77677080ca /fs/bcachefs/fsck.c | |
parent | 6ab71b4a8e281f30a3dfd6f7831d9a2c67e162e4 (diff) | |
download | linux-ac01928b8e9688aca3c23134d4c889c4839c360a.tar.xz |
bcachefs: bch2_hash_lookup() now returns bkey_s_c
small cleanup
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fsck.c')
-rw-r--r-- | fs/bcachefs/fsck.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index 8e2010212cc3..caef81aa618c 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -127,13 +127,13 @@ static int lookup_dirent_in_snapshot(struct btree_trans *trans, u64 *target, unsigned *type, u32 snapshot) { struct btree_iter iter; - struct bkey_s_c_dirent d; - int ret = bch2_hash_lookup_in_snapshot(trans, &iter, bch2_dirent_hash_desc, - &hash_info, dir, name, 0, snapshot); + struct bkey_s_c k = bch2_hash_lookup_in_snapshot(trans, &iter, bch2_dirent_hash_desc, + &hash_info, dir, name, 0, snapshot); + int ret = bkey_err(k); if (ret) return ret; - d = bkey_s_c_to_dirent(bch2_btree_iter_peek_slot(&iter)); + struct bkey_s_c_dirent d = bkey_s_c_to_dirent(bch2_btree_iter_peek_slot(&iter)); *target = le64_to_cpu(d.v->d_inum); *type = d.v->d_type; bch2_trans_iter_exit(trans, &iter); |