bcachefs: avoid returning private error code in bch2_xattr_bcachefs_set
Avoid the private error code return to caller. The error code should be transformed into genernal error code. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
7e64c86cdc
commit
7e23c1746b
@ -544,11 +544,11 @@ static int bch2_xattr_bcachefs_set(const struct xattr_handler *handler,
|
|||||||
kfree(buf);
|
kfree(buf);
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
goto err_class_exit;
|
||||||
|
|
||||||
ret = bch2_opt_check_may_set(c, opt_id, v);
|
ret = bch2_opt_check_may_set(c, opt_id, v);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
goto err_class_exit;
|
||||||
|
|
||||||
s.v = v + 1;
|
s.v = v + 1;
|
||||||
s.defined = true;
|
s.defined = true;
|
||||||
@ -595,6 +595,7 @@ err:
|
|||||||
(opt_id == Opt_compression && !inode_opt_get(c, &inode->ei_inode, background_compression))))
|
(opt_id == Opt_compression && !inode_opt_get(c, &inode->ei_inode, background_compression))))
|
||||||
bch2_set_rebalance_needs_scan(c, inode->ei_inode.bi_inum);
|
bch2_set_rebalance_needs_scan(c, inode->ei_inode.bi_inum);
|
||||||
|
|
||||||
|
err_class_exit:
|
||||||
return bch2_err_class(ret);
|
return bch2_err_class(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user