]> 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)
commit334c2cbef18b1ba8b107a96acab47af04dfd170b
tree07ba817584a83c1838305b7d71b61a97260e8d36
parent9d09e142268f39f383b43eaeb00037f6e0b44f58
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