Skip to content

Commit f917016

Browse files
author
Kent Overstreet
committed
bcachefs: Reduce stack frame size of __bch2_str_hash_check_key()
We don't need all the helpers inlined here. Signed-off-by: Kent Overstreet <[email protected]>
1 parent a858175 commit f917016

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

fs/bcachefs/str_hash.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ static int bch2_dirent_has_target(struct btree_trans *trans, struct bkey_s_c_dir
3131
}
3232
}
3333

34-
static int fsck_rename_dirent(struct btree_trans *trans,
35-
struct snapshots_seen *s,
36-
const struct bch_hash_desc desc,
37-
struct bch_hash_info *hash_info,
38-
struct bkey_s_c_dirent old)
34+
static noinline int fsck_rename_dirent(struct btree_trans *trans,
35+
struct snapshots_seen *s,
36+
const struct bch_hash_desc desc,
37+
struct bch_hash_info *hash_info,
38+
struct bkey_s_c_dirent old)
3939
{
4040
struct qstr old_name = bch2_dirent_get_name(old);
4141
struct bkey_i_dirent *new = bch2_trans_kmalloc(trans, bkey_bytes(old.k) + 32);
@@ -71,11 +71,11 @@ static int fsck_rename_dirent(struct btree_trans *trans,
7171
return bch2_fsck_update_backpointers(trans, s, desc, hash_info, &new->k_i);
7272
}
7373

74-
static int hash_pick_winner(struct btree_trans *trans,
75-
const struct bch_hash_desc desc,
76-
struct bch_hash_info *hash_info,
77-
struct bkey_s_c k1,
78-
struct bkey_s_c k2)
74+
static noinline int hash_pick_winner(struct btree_trans *trans,
75+
const struct bch_hash_desc desc,
76+
struct bch_hash_info *hash_info,
77+
struct bkey_s_c k1,
78+
struct bkey_s_c k2)
7979
{
8080
if (bkey_val_bytes(k1.k) == bkey_val_bytes(k2.k) &&
8181
!memcmp(k1.v, k2.v, bkey_val_bytes(k1.k)))
@@ -142,8 +142,8 @@ static int repair_inode_hash_info(struct btree_trans *trans,
142142
* All versions of the same inode in different snapshots must have the same hash
143143
* seed/type: verify that the hash info we're using matches the root
144144
*/
145-
static int check_inode_hash_info_matches_root(struct btree_trans *trans, u64 inum,
146-
struct bch_hash_info *hash_info)
145+
static noinline int check_inode_hash_info_matches_root(struct btree_trans *trans, u64 inum,
146+
struct bch_hash_info *hash_info)
147147
{
148148
struct bch_fs *c = trans->c;
149149
struct btree_iter iter;

0 commit comments

Comments
 (0)