summaryrefslogtreecommitdiff
path: root/libbcachefs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/super.c')
-rw-r--r--libbcachefs/super.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbcachefs/super.c b/libbcachefs/super.c
index 3a7f4e29..8a269b68 100644
--- a/libbcachefs/super.c
+++ b/libbcachefs/super.c
@@ -647,7 +647,7 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts)
c = kvpmalloc(sizeof(struct bch_fs), GFP_KERNEL|__GFP_ZERO);
if (!c) {
- c = ERR_PTR(-ENOMEM);
+ c = ERR_PTR(-BCH_ERR_ENOMEM_fs_alloc);
goto out;
}
@@ -737,7 +737,7 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts)
strscpy(c->name, name.buf, sizeof(c->name));
printbuf_exit(&name);
- ret = name.allocation_failure ? -ENOMEM : 0;
+ ret = name.allocation_failure ? -BCH_ERR_ENOMEM_fs_name_alloc : 0;
if (ret)
goto err;
@@ -801,7 +801,7 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts)
mempool_init_kmalloc_pool(&c->large_bkey_pool, 1, 2048) ||
!(c->unused_inode_hints = kcalloc(1U << c->inode_shard_bits,
sizeof(u64), GFP_KERNEL))) {
- ret = -ENOMEM;
+ ret = -BCH_ERR_ENOMEM_fs_other_alloc;
goto err;
}
@@ -1182,7 +1182,7 @@ out:
err:
if (ca)
bch2_dev_free(ca);
- ret = -ENOMEM;
+ ret = -BCH_ERR_ENOMEM_dev_alloc;
goto out;
}