From 098ef98d5bff461c66c3798fbebca7b1c06fdf79 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 18 Sep 2022 17:10:33 -0400 Subject: 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 --- fs/bcachefs/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/bcachefs/quota.c') diff --git a/fs/bcachefs/quota.c b/fs/bcachefs/quota.c index 454c76e03be9..c12d715fb758 100644 --- a/fs/bcachefs/quota.c +++ b/fs/bcachefs/quota.c @@ -665,7 +665,7 @@ static int bch2_quota_set_info(struct super_block *sb, int type, sb_quota = bch2_sb_resize_quota(&c->disk_sb, sizeof(*sb_quota) / sizeof(u64)); if (!sb_quota) - return -ENOSPC; + return -BCH_ERR_ENOSPC_sb_quota; } if (info->i_fieldmask & QC_SPC_TIMER) -- cgit v1.2.3