X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libbcachefs%2Fsuper.c;h=8a269b680295f4ae7da7de1a81713a49db797bbb;hb=ec28e6bfa269daf953af95610c0d1af3e7df1c0a;hp=3a7f4e295cbd2840ca27fddcf9f8ccb983f15778;hpb=fa358537725c8065b058b558125cf15359936f94;p=bcachefs-tools-debian diff --git a/libbcachefs/super.c b/libbcachefs/super.c index 3a7f4e2..8a269b6 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; }