diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2017-08-23 14:15:09 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-09-26 08:48:30 -0400 |
commit | 5f14efd3d437205143dcffcf776e0122eae1755a (patch) | |
tree | 5cb4506a16f0faa6e97f62f6ee5e890f9eee8a78 | |
parent | ff40adf7fbdff96860b1153332c0b1c7bab6e0c1 (diff) |
Btrfs: do not reset bio->bi_ops while writing bio
flush_epd_write_bio() sets bio->bi_opf by itself to honor REQ_SYNC,
but it's not needed at all since bio->bi_opf has set up properly in
both __extent_writepage() and write_one_eb(), and in the case of
write_one_eb(), it also sets REQ_META, which we will lose in
flush_epd_write_bio().
This remove this unnecessary bio->bi_opf setting.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/extent_io.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 4ead6da5a645..3738d245518c 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -4062,9 +4062,6 @@ static void flush_epd_write_bio(struct extent_page_data *epd) | |||
4062 | if (epd->bio) { | 4062 | if (epd->bio) { |
4063 | int ret; | 4063 | int ret; |
4064 | 4064 | ||
4065 | bio_set_op_attrs(epd->bio, REQ_OP_WRITE, | ||
4066 | epd->sync_io ? REQ_SYNC : 0); | ||
4067 | |||
4068 | ret = submit_one_bio(epd->bio, 0, epd->bio_flags); | 4065 | ret = submit_one_bio(epd->bio, 0, epd->bio_flags); |
4069 | BUG_ON(ret < 0); /* -ENOMEM */ | 4066 | BUG_ON(ret < 0); /* -ENOMEM */ |
4070 | epd->bio = NULL; | 4067 | epd->bio = NULL; |