]> asedeno.scripts.mit.edu Git - linux.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)
commit922f0518249d20d00ba11470331a2c89b6749c91
tree07ba817584a83c1838305b7d71b61a97260e8d36
parentbb55f6260b4756ba0ce46fc373f6f2e1893f752d
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