]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: streamline code in run_delalloc_nocow in case of inline extents
authorNikolay Borisov <nborisov@suse.com>
Mon, 5 Aug 2019 14:47:06 +0000 (17:47 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 9 Sep 2019 12:59:13 +0000 (14:59 +0200)
commitb32f9f14d33c6d6f89ae171b4a782ae4e8f7ca24
tree07ba817584a83c1838305b7d71b61a97260e8d36
parent860ddf853e78bc7036b23091ca5a2f7cca932a95
btrfs: streamline code in run_delalloc_nocow in case of inline extents

The extent range check right after the "out_check" label is redundant,
because the only way it can trigger is if we have an inline extent. In
this case it makes more sense to actually move it in the branch
explictly dealing with inlines extents.

What's more, the nested 'if (nocow)' can never be true because for
inline extents we always do COW and there is no chance 'nocow' can be
true, just remove that check.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c