aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/unix_bpf.c
diff options
context:
space:
mode:
authorChen Linxuan <[email protected]>2025-03-17 02:29:24 +0000
committerJens Axboe <[email protected]>2025-03-18 18:32:09 +0000
commite1a0202c6bfda24002a3ae2115154fa90104c649 (patch)
treede891e9323369bbfc8f266ae784b884f1390b1f4 /net/unix/unix_bpf.c
parentloop: move vfs_fsync() out of loop_update_dio() (diff)
downloadkernel-e1a0202c6bfda24002a3ae2115154fa90104c649.tar.gz
kernel-e1a0202c6bfda24002a3ae2115154fa90104c649.zip
blk-cgroup: improve policy registration error handling
This patch improve the returned error code of blkcg_policy_register(). 1. Move the validation check for cpd/pd_alloc_fn and cpd/pd_free_fn function pairs to the start of blkcg_policy_register(). This ensures we immediately return -EINVAL if the function pairs are not correctly provided, rather than returning -ENOSPC after locking and unlocking mutexes unnecessarily. Those locks should not contention any problems, as error of policy registration is a super cold path. 2. Return -ENOMEM when cpd_alloc_fn() failed. Co-authored-by: Wen Tao <[email protected]> Signed-off-by: Wen Tao <[email protected]> Signed-off-by: Chen Linxuan <[email protected]> Reviewed-by: Michal Koutný <[email protected]> Acked-by: Tejun Heo <[email protected]> Reviewed-by: Yu Kuai <[email protected]> Link: https://lore.kernel.org/r/3E333A73B6B6DFC0+20250317022924.150907-1-chenlinxuan@uniontech.com Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'net/unix/unix_bpf.c')
0 files changed, 0 insertions, 0 deletions