btrfs: Move skip checksum check from btrfs_submit_direct to __btrfs_submit_dio_bio
authorNikolay Borisov <nborisov@suse.com>
Thu, 3 Aug 2017 12:44:58 +0000 (15:44 +0300)
committerDavid Sterba <dsterba@suse.com>
Fri, 18 Aug 2017 14:36:29 +0000 (16:36 +0200)
commite6961cac730f62d9b07efb53835c4eb5ed407bde
treeb030a49f2579d4a01c65d6feb070518b0d3bcd1f
parent6399fb5a0b69a9cc73aa84767954366d867b145d
btrfs: Move skip checksum check from btrfs_submit_direct to __btrfs_submit_dio_bio

Currently the code checks whether we should do data checksumming in
btrfs_submit_direct and the boolean result of this check is passed to
btrfs_submit_direct_hook, in turn passing it to __btrfs_submit_dio_bio which
actually consumes it. The last function actually has all the necessary context
to figure out whether to skip the check or not, so let's move the check closer
to where it's being consumed. No functional changes.

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