bcachefs: Convert bucket_alloc_ret to negative error codes
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 28 Nov 2021 18:42:05 +0000 (13:42 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:17 +0000 (17:09 -0400)
commitfc6c01e2ea5292a740ddedb5b2b3805e8ecb3f4b
treebc9b86af3d7198eb57f96b65e645d537601c65b2
parentdcfc593f7b3a35e340f0cefa3281a3285ddb48e8
bcachefs: Convert bucket_alloc_ret to negative error codes

Start a new header, errcode.h, for bcachefs-private error codes - more
error codes will be converted later.

This patch just converts bucket_alloc_ret so that they can be mixed with
standard error codes and passed as ERR_PTR errors - the ec.c code was
doing this already, but incorrectly.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_foreground.h
fs/bcachefs/bcachefs.h
fs/bcachefs/ec.c
fs/bcachefs/errcode.h [new file with mode: 0644]