summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/journal_sb.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-09-18 17:10:33 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:40 -0400
commit098ef98d5bff461c66c3798fbebca7b1c06fdf79 (patch)
tree02879fcbd6d74a5a05a46ad399a73dac4aafd33b /fs/bcachefs/journal_sb.c
parent5c1ef830f6786059f85bebe7501b63dffed0b633 (diff)
downloadlinux-098ef98d5bff461c66c3798fbebca7b1c06fdf79.tar.gz
linux-098ef98d5bff461c66c3798fbebca7b1c06fdf79.tar.bz2
linux-098ef98d5bff461c66c3798fbebca7b1c06fdf79.zip
bcachefs: Add private error codes for ENOSPC
Continuing the saga of introducing private dedicated error codes for each error path, this patch converts ENOSPC to error codes that are subtypes of ENOSPC. We've recently had a test failure where we got -ENOSPC where we shouldn't have, and didn't have enough information to tell where it came from, so this patch will solve that problem. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_sb.c')
-rw-r--r--fs/bcachefs/journal_sb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_sb.c b/fs/bcachefs/journal_sb.c
index 001cecec1291..cfdbd92d2164 100644
--- a/fs/bcachefs/journal_sb.c
+++ b/fs/bcachefs/journal_sb.c
@@ -197,7 +197,7 @@ int bch2_journal_buckets_to_sb(struct bch_fs *c, struct bch_dev *ca)
j = bch2_sb_resize_journal_v2(&ca->disk_sb,
(sizeof(*j) + sizeof(j->d[0]) * nr) / sizeof(u64));
if (!j)
- return -ENOSPC;
+ return -BCH_ERR_ENOSPC_sb_journal;
bch2_sb_field_delete(&ca->disk_sb, BCH_SB_FIELD_journal);