diff options
| author | Jan Kara <jack@suse.cz> | 2016-09-30 01:57:41 -0400 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2016-09-30 01:57:41 -0400 |
| commit | 51e8137b82622d8ea22e993d613db568f11c1523 (patch) | |
| tree | c76a6cb27b7ec6ae3e5f9833ca4fdecfba5a9519 /fs/ext4 | |
| parent | 4b0524aae0082272737c97d2b160d55d6e8f0b2b (diff) | |
ext4: remove plugging from ext4_file_write_iter()
do_blockdev_direct_IO() takes care of properly plugging direct IO so
there's no need to plug again inside ext4_file_write_iter().
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
| -rw-r--r-- | fs/ext4/file.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 25342c8dd5d6..25f763f2201a 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c | |||
| @@ -92,7 +92,6 @@ static ssize_t | |||
| 92 | ext4_file_write_iter(struct kiocb *iocb, struct iov_iter *from) | 92 | ext4_file_write_iter(struct kiocb *iocb, struct iov_iter *from) |
| 93 | { | 93 | { |
| 94 | struct inode *inode = file_inode(iocb->ki_filp); | 94 | struct inode *inode = file_inode(iocb->ki_filp); |
| 95 | struct blk_plug plug; | ||
| 96 | int o_direct = iocb->ki_flags & IOCB_DIRECT; | 95 | int o_direct = iocb->ki_flags & IOCB_DIRECT; |
| 97 | int unaligned_aio = 0; | 96 | int unaligned_aio = 0; |
| 98 | int overwrite = 0; | 97 | int overwrite = 0; |
| @@ -133,7 +132,6 @@ ext4_file_write_iter(struct kiocb *iocb, struct iov_iter *from) | |||
| 133 | if (o_direct) { | 132 | if (o_direct) { |
| 134 | size_t length = iov_iter_count(from); | 133 | size_t length = iov_iter_count(from); |
| 135 | loff_t pos = iocb->ki_pos; | 134 | loff_t pos = iocb->ki_pos; |
| 136 | blk_start_plug(&plug); | ||
| 137 | 135 | ||
| 138 | /* check whether we do a DIO overwrite or not */ | 136 | /* check whether we do a DIO overwrite or not */ |
| 139 | if (ext4_should_dioread_nolock(inode) && !unaligned_aio && | 137 | if (ext4_should_dioread_nolock(inode) && !unaligned_aio && |
| @@ -169,8 +167,6 @@ ext4_file_write_iter(struct kiocb *iocb, struct iov_iter *from) | |||
| 169 | 167 | ||
| 170 | if (ret > 0) | 168 | if (ret > 0) |
| 171 | ret = generic_write_sync(iocb, ret); | 169 | ret = generic_write_sync(iocb, ret); |
| 172 | if (o_direct) | ||
| 173 | blk_finish_plug(&plug); | ||
| 174 | 170 | ||
| 175 | return ret; | 171 | return ret; |
| 176 | 172 | ||
