diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-05-28 01:59:59 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:10:03 +0200 |
commit | e47a390aa5946e3c5bea7a4a350a88d3bb3ba5b4 (patch) | |
tree | 01ca402a24c057458a13a3f97e4813bc037d2c76 /fs/bcachefs/acl.c | |
parent | bcachefs: trans_for_each_path_safe() (diff) | |
download | linux-e47a390aa5946e3c5bea7a4a350a88d3bb3ba5b4.tar.xz linux-e47a390aa5946e3c5bea7a4a350a88d3bb3ba5b4.zip |
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.c | 6 |
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); |