summaryrefslogtreecommitdiff
path: root/libbcachefs/inode.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-06-19 13:12:31 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-06-19 13:12:31 -0400
commit10ed83353be8c8fcfb89b2e700fb8f2be0f8673c (patch)
treef02dd2c5d07c5d1402391fd63706383be5d00cd8 /libbcachefs/inode.c
parent35c7f2b4e369fec62633de667339496c3e4544c8 (diff)
Update bcachefs sources to 20342b5217ca bcachefs: Plumb trans_kmalloc ip to trans_log_msg
Diffstat (limited to 'libbcachefs/inode.c')
-rw-r--r--libbcachefs/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbcachefs/inode.c b/libbcachefs/inode.c
index 53e5dc1f..95f3c0d4 100644
--- a/libbcachefs/inode.c
+++ b/libbcachefs/inode.c
@@ -1265,11 +1265,11 @@ int bch2_inode_set_casefold(struct btree_trans *trans, subvol_inum inum,
{
struct bch_fs *c = trans->c;
-#ifdef CONFIG_UNICODE
+#if IS_ENABLED(CONFIG_UNICODE)
int ret = 0;
/* Not supported on individual files. */
if (!S_ISDIR(bi->bi_mode))
- return -EOPNOTSUPP;
+ return bch_err_throw(c, casefold_opt_is_dir_only);
/*
* Make sure the dir is empty, as otherwise we'd need to
@@ -1291,7 +1291,7 @@ int bch2_inode_set_casefold(struct btree_trans *trans, subvol_inum inum,
return bch2_maybe_propagate_has_case_insensitive(trans, inum, bi);
#else
bch_err(c, "Cannot use casefolding on a kernel without CONFIG_UNICODE");
- return -EOPNOTSUPP;
+ return bch_err_throw(c, no_casefolding_without_utf8);
#endif
}