diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-09-15 15:56:07 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:10:14 +0300 |
commit | b6c22147e0fcfd16e672093178d940db3ea6923e (patch) | |
tree | 0bf7e79cc251a67c20726fa88391f367b6d5acd4 /fs/bcachefs/acl.c | |
parent | e9a0a26ed05a93034f3d49374dd5ef943db2d5b7 (diff) | |
download | linux-b6c22147e0fcfd16e672093178d940db3ea6923e.tar.xz |
bcachefs: acl: Add missing check in bch2_acl_chmod()
The "ret = bkey_err(k);" assignment was accidentally left out so the
call to bch2_btree_iter_peek_slot() is not checked for errors.
Fixes: 53306e096d91 ("bcachefs: Always check for transaction restarts")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/acl.c')
-rw-r--r-- | fs/bcachefs/acl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/acl.c b/fs/bcachefs/acl.c index 6b1579e96dfe..f3809897f00a 100644 --- a/fs/bcachefs/acl.c +++ b/fs/bcachefs/acl.c @@ -427,9 +427,10 @@ int bch2_acl_chmod(struct btree_trans *trans, subvol_inum inum, return bch2_err_matches(ret, ENOENT) ? 0 : ret; k = bch2_btree_iter_peek_slot(&iter); - xattr = bkey_s_c_to_xattr(k); + ret = bkey_err(k); if (ret) goto err; + xattr = bkey_s_c_to_xattr(k); acl = bch2_acl_from_disk(trans, xattr_val(xattr.v), le16_to_cpu(xattr.v->x_val_len)); |