btrfs: simplify code flow in btrfs_delayed_inode_reserve_metadata
authorNikolay Borisov <nborisov@suse.com>
Mon, 22 Feb 2021 16:40:47 +0000 (18:40 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:15 +0000 (17:25 +0200)
commit98686ffc71f58191ab3f4069d9ae7eee60fb3889
treea53539110ae52edf96fbae621e794ad59f2d600b
parent8e3c9d3cf8a449cdc4c9bd8a62ba7b5e4bd52972
btrfs: simplify code flow in btrfs_delayed_inode_reserve_metadata

btrfs_block_rsv_add can return only ENOSPC since it's called with
NO_FLUSH modifier. This so simplify the logic in
btrfs_delayed_inode_reserve_metadata to exploit this invariant.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ add assert and comment ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-inode.c