]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
bcachefs: Reduce stack frame size of __bch2_str_hash_check_key()
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 21 Jan 2025 17:56:00 +0000 (12:56 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 21 Jan 2025 17:57:48 +0000 (12:57 -0500)
We don't need all the helpers inlined here.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/str_hash.c

index 8c2c5539de2eddc10ac7c8d2d6eeda17dc6b737e..d78451c2a0c64c71fbdb356f2da86c6178a9081a 100644 (file)
@@ -31,11 +31,11 @@ static int bch2_dirent_has_target(struct btree_trans *trans, struct bkey_s_c_dir
        }
 }
 
-static int fsck_rename_dirent(struct btree_trans *trans,
-                             struct snapshots_seen *s,
-                             const struct bch_hash_desc desc,
-                             struct bch_hash_info *hash_info,
-                             struct bkey_s_c_dirent old)
+static noinline int fsck_rename_dirent(struct btree_trans *trans,
+                                      struct snapshots_seen *s,
+                                      const struct bch_hash_desc desc,
+                                      struct bch_hash_info *hash_info,
+                                      struct bkey_s_c_dirent old)
 {
        struct qstr old_name = bch2_dirent_get_name(old);
        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,
        return bch2_fsck_update_backpointers(trans, s, desc, hash_info, &new->k_i);
 }
 
-static int hash_pick_winner(struct btree_trans *trans,
-                           const struct bch_hash_desc desc,
-                           struct bch_hash_info *hash_info,
-                           struct bkey_s_c k1,
-                           struct bkey_s_c k2)
+static noinline int hash_pick_winner(struct btree_trans *trans,
+                                    const struct bch_hash_desc desc,
+                                    struct bch_hash_info *hash_info,
+                                    struct bkey_s_c k1,
+                                    struct bkey_s_c k2)
 {
        if (bkey_val_bytes(k1.k) == bkey_val_bytes(k2.k) &&
            !memcmp(k1.v, k2.v, bkey_val_bytes(k1.k)))
@@ -142,8 +142,8 @@ fsck_err:
  * All versions of the same inode in different snapshots must have the same hash
  * seed/type: verify that the hash info we're using matches the root
  */
-static int check_inode_hash_info_matches_root(struct btree_trans *trans, u64 inum,
-                                             struct bch_hash_info *hash_info)
+static noinline int check_inode_hash_info_matches_root(struct btree_trans *trans, u64 inum,
+                                                      struct bch_hash_info *hash_info)
 {
        struct bch_fs *c = trans->c;
        struct btree_iter iter;