btrfs: Pass 0 for bio_offset to btrfs_wq_submit_bio
authorNikolay Borisov <nborisov@suse.com>
Wed, 10 Apr 2019 14:24:41 +0000 (17:24 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:46 +0000 (19:02 +0200)
Buffered writeback always calls btrfs_csum_one_bio with the last 2
arguments being 0 irrespective of what the bio_offset has been passed to
btrfs_submit_bio_start. Make this apparent by explicitly passing 0 for
bio_offset when calling btrfs_wq_submit_bio from btrfs_submit_bio_hook.
This will allow for further simplifications down the line. No functional
changes.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
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

index 130b1c8f546a1209f54b1e612cb8af3d9c7580f2..1e7e8421e524fa566227091e3880e950c98a6c23 100644 (file)
@@ -1991,8 +1991,7 @@ static blk_status_t btrfs_submit_bio_hook(struct inode *inode, struct bio *bio,
                        goto mapit;
                /* we're doing a write, do the async checksumming */
                ret = btrfs_wq_submit_bio(fs_info, bio, mirror_num, bio_flags,
-                                         bio_offset, inode,
-                                         btrfs_submit_bio_start);
+                                         0, inode, btrfs_submit_bio_start);
                goto out;
        } else if (!skip_sum) {
                ret = btrfs_csum_one_bio(inode, bio, 0, 0);