summaryrefslogtreecommitdiff
path: root/libbcachefs/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/fs.c')
-rw-r--r--libbcachefs/fs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libbcachefs/fs.c b/libbcachefs/fs.c
index 3063a8dd..df42d58d 100644
--- a/libbcachefs/fs.c
+++ b/libbcachefs/fs.c
@@ -722,7 +722,7 @@ static struct dentry *bch2_lookup(struct inode *vdir, struct dentry *dentry,
if (IS_ERR(inode))
inode = NULL;
-#ifdef CONFIG_UNICODE
+#if IS_ENABLED(CONFIG_UNICODE)
if (!inode && IS_CASEFOLDED(vdir)) {
/*
* Do not cache a negative dentry in casefolded directories
@@ -1695,10 +1695,10 @@ static int bch2_fileattr_set(struct mnt_idmap *idmap,
s.mask = map_defined(bch_flags_to_xflags);
s.flags |= map_flags_rev(bch_flags_to_xflags, fa->fsx_xflags);
if (fa->fsx_xflags)
- return -EOPNOTSUPP;
+ return bch_err_throw(c, unsupported_fsx_flag);
if (fa->fsx_projid >= U32_MAX)
- return -EINVAL;
+ return bch_err_throw(c, projid_too_big);
/*
* inode fields accessible via the xattr interface are stored with a +1
@@ -1721,7 +1721,7 @@ static int bch2_fileattr_set(struct mnt_idmap *idmap,
s.flags |= map_flags_rev(bch_flags_to_uflags, fa->flags);
if (fa->flags)
- return -EOPNOTSUPP;
+ return bch_err_throw(c, unsupported_fa_flag);
}
mutex_lock(&inode->ei_update_lock);
@@ -2564,7 +2564,7 @@ got_sb:
sb->s_shrink->seeks = 0;
-#ifdef CONFIG_UNICODE
+#if IS_ENABLED(CONFIG_UNICODE)
sb->s_encoding = c->cf_encoding;
#endif
generic_set_sb_d_ops(sb);