summaryrefslogtreecommitdiff
path: root/fs/bcachefs/lru.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-04-11 01:12:04 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:31 +0300
commit84befe8ef9a07be1cd9bac4e1a1c66c667f71499 (patch)
treec2c80f4f53bc37b63942a6f93a359e5b625e3ec7 /fs/bcachefs/lru.c
parent3518e6faeff20d1de1f0c7388d9d9c6f2fe7f5a7 (diff)
downloadlinux-84befe8ef9a07be1cd9bac4e1a1c66c667f71499.tar.xz
bcachefs: Use bch2_trans_inconsistent_on() in more places
This gets us better error messages. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/lru.c')
-rw-r--r--fs/bcachefs/lru.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/bcachefs/lru.c b/fs/bcachefs/lru.c
index ef4b4a9f0d5f..d8180bc1c6b1 100644
--- a/fs/bcachefs/lru.c
+++ b/fs/bcachefs/lru.c
@@ -32,7 +32,6 @@ void bch2_lru_to_text(struct printbuf *out, struct bch_fs *c,
static int lru_delete(struct btree_trans *trans, u64 id, u64 idx, u64 time)
{
- struct bch_fs *c = trans->c;
struct btree_iter iter;
struct bkey_s_c k;
u64 existing_idx;
@@ -51,7 +50,7 @@ static int lru_delete(struct btree_trans *trans, u64 id, u64 idx, u64 time)
goto err;
if (k.k->type != KEY_TYPE_lru) {
- bch2_fs_inconsistent(c,
+ bch2_trans_inconsistent(trans,
"pointer to nonexistent lru %llu:%llu",
id, time);
ret = -EIO;
@@ -60,7 +59,7 @@ static int lru_delete(struct btree_trans *trans, u64 id, u64 idx, u64 time)
existing_idx = le64_to_cpu(bkey_s_c_to_lru(k).v->idx);
if (existing_idx != idx) {
- bch2_fs_inconsistent(c,
+ bch2_trans_inconsistent(trans,
"lru %llu:%llu with wrong backpointer: got %llu, should be %llu",
id, time, existing_idx, idx);
ret = -EIO;