Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Hongbo Li and committed by
Kent Overstreet
7e23c174 7e64c86c

+3 -2
+3 -2
fs/bcachefs/xattr.c
··· 544 544 kfree(buf); 545 545 546 546 if (ret < 0) 547 - return ret; 547 + goto err_class_exit; 548 548 549 549 ret = bch2_opt_check_may_set(c, opt_id, v); 550 550 if (ret < 0) 551 - return ret; 551 + goto err_class_exit; 552 552 553 553 s.v = v + 1; 554 554 s.defined = true; ··· 595 595 (opt_id == Opt_compression && !inode_opt_get(c, &inode->ei_inode, background_compression)))) 596 596 bch2_set_rebalance_needs_scan(c, inode->ei_inode.bi_inum); 597 597 598 + err_class_exit: 598 599 return bch2_err_class(ret); 599 600 } 600 601