diff options
author | Nikolay Borisov <nborisov@suse.com> | 2017-12-13 10:25:38 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-22 16:08:19 +0100 |
commit | ea057f6dafcb6d21dd2c8be0e45ba3979b98e2b3 (patch) | |
tree | 2027239c0fe7dc2c4e896402494b4dabdab5a1be /fs/btrfs/inode.c | |
parent | 32506af595dcaa8b71b7858bb54ccaa310d274fb (diff) | |
download | lwn-ea057f6dafcb6d21dd2c8be0e45ba3979b98e2b3.tar.gz lwn-ea057f6dafcb6d21dd2c8be0e45ba3979b98e2b3.zip |
btrfs: Remove redundant bio_get/set from submit_dio_repair_bio
The bio that is passsed is the newly created repair bio which already
has a reference count of 1, which is going to be consumed by the
endio routine on successful submission. On error the handler also
calls bio_put.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 46df5e2a64e7..bacf71ccf0f2 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -7941,15 +7941,12 @@ static inline blk_status_t submit_dio_repair_bio(struct inode *inode, BUG_ON(bio_op(bio) == REQ_OP_WRITE); - bio_get(bio); - ret = btrfs_bio_wq_end_io(fs_info, bio, BTRFS_WQ_ENDIO_DIO_REPAIR); if (ret) - goto err; + return ret; ret = btrfs_map_bio(fs_info, bio, mirror_num, 0); -err: - bio_put(bio); + return ret; } |