btrfs: unify handling of return values of btrfs_insert_empty_items()
authorDavid Sterba <dsterba@suse.com>
Wed, 24 Jan 2024 14:59:36 +0000 (15:59 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 4 Mar 2024 15:24:48 +0000 (16:24 +0100)
commit5378ea6ea095e25bb32fa1a76e29c8aa4a3ff6c5
tree8fd021bc34e4367f5a5ff1d7249b7c20cc1498d6
parent53e4d8c29095f169be2b1593bff8e4feb44ce94e
btrfs: unify handling of return values of btrfs_insert_empty_items()

The error values returned by btrfs_insert_empty_items() are following
the common patter of 0/-errno, but some callers check for a value > 0,
which can't happen. Document that and update calls to not expect
positive values.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c
fs/btrfs/file-item.c
fs/btrfs/uuid-tree.c