Eric Biggers e5465795ca ext4: fix off-by-one error when writing back pages before dio read
The 'lend' argument of filemap_write_and_wait_range() is inclusive, so
we need to subtract 1 from pos + count.

Note that 'count' is guaranteed to be nonzero since
ext4_file_read_iter() returns early when given a 0 count.

Fixes: 16c54688592c ("ext4: Allow parallel DIO reads")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
2017-05-24 18:05:29 -04:00
..
2015-04-02 23:47:42 -04:00
2016-09-30 02:14:56 -04:00
2017-04-30 00:36:53 -04:00
2017-04-30 00:36:53 -04:00
2017-02-02 11:52:14 -05:00
2016-05-13 00:44:16 -04:00
2017-04-30 00:36:53 -04:00
2017-04-30 00:36:53 -04:00
2016-03-09 23:49:05 -05:00
2016-11-01 09:43:26 -06:00
2017-04-03 01:05:58 -04:00
2017-04-30 00:01:02 -04:00