]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd6d88c211573de36bfef4e43bd47a4e92c0eed63
treeb030a49f2579d4a01c65d6feb070518b0d3bcd1f
parent6e5a611e4c1a20876f168d60cd7f88efac04fa84
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