bcachefs: Fix warning when building in userspace
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 24 Nov 2023 01:05:45 +0000 (20:05 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 1 Jan 2024 16:47:36 +0000 (11:47 -0500)
bch_err() doesn't reference the fs arg in userspace

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

index 12907beda98c2b9d259e7896b79867adbbb9a88e..9cedc1755d34dc1919a279171773d51213d988ab 100644 (file)
@@ -361,7 +361,6 @@ noinline static int
 btree_key_can_insert_cached_slowpath(struct btree_trans *trans, unsigned flags,
                                     struct btree_path *path, unsigned new_u64s)
 {
-       struct bch_fs *c = trans->c;
        struct btree_insert_entry *i;
        struct bkey_cached *ck = (void *) path->l[0].b;
        struct bkey_i *new_k;
@@ -372,7 +371,7 @@ btree_key_can_insert_cached_slowpath(struct btree_trans *trans, unsigned flags,
 
        new_k = kmalloc(new_u64s * sizeof(u64), GFP_KERNEL);
        if (!new_k) {
-               bch_err(c, "error allocating memory for key cache key, btree %s u64s %u",
+               bch_err(trans->c, "error allocating memory for key cache key, btree %s u64s %u",
                        bch2_btree_id_str(path->btree_id), new_u64s);
                return -BCH_ERR_ENOMEM_btree_key_cache_insert;
        }