summaryrefslogtreecommitdiff
path: root/fs/bcachefs/acl.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-05-28 02:59:59 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:10:03 +0300
commite47a390aa5946e3c5bea7a4a350a88d3bb3ba5b4 (patch)
tree01ca402a24c057458a13a3f97e4813bc037d2c76 /fs/bcachefs/acl.c
parentf154c3eb429a340d66a06e8f8d2221d28d25ab45 (diff)
downloadlinux-e47a390aa5946e3c5bea7a4a350a88d3bb3ba5b4.tar.xz
bcachefs: Convert -ENOENT to private error codes
As with previous conversions, replace -ENOENT uses with more informative private error codes. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/acl.c')
-rw-r--r--fs/bcachefs/acl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/acl.c b/fs/bcachefs/acl.c
index 2bf58aa89f71..3fe108bc2f08 100644
--- a/fs/bcachefs/acl.c
+++ b/fs/bcachefs/acl.c
@@ -236,7 +236,7 @@ retry:
if (ret) {
if (bch2_err_matches(ret, BCH_ERR_transaction_restart))
goto retry;
- if (ret != -ENOENT)
+ if (!bch2_err_matches(ret, ENOENT))
acl = ERR_PTR(ret);
goto out;
}
@@ -287,7 +287,7 @@ int bch2_set_acl_trans(struct btree_trans *trans, subvol_inum inum,
inum, &search);
}
- return ret == -ENOENT ? 0 : ret;
+ return bch2_err_matches(ret, ENOENT) ? 0 : ret;
}
int bch2_set_acl(struct mnt_idmap *idmap,
@@ -368,7 +368,7 @@ int bch2_acl_chmod(struct btree_trans *trans, subvol_inum inum,
&X_SEARCH(KEY_TYPE_XATTR_INDEX_POSIX_ACL_ACCESS, "", 0),
BTREE_ITER_INTENT);
if (ret)
- return ret == -ENOENT ? 0 : ret;
+ return bch2_err_matches(ret, ENOENT) ? 0 : ret;
k = bch2_btree_iter_peek_slot(&iter);
xattr = bkey_s_c_to_xattr(k);