projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d71e53c
)
mm/filemap: pass inclusive 'end_byte' parameter to filemap_range_has_page
author
zhengbin
<
[email protected]
>
Tue, 5 Mar 2019 23:44:21 +0000
(15:44 -0800)
committer
Linus Torvalds
<
[email protected]
>
Wed, 6 Mar 2019 05:07:16 +0000
(21:07 -0800)
The 'end_byte' parameter of filemap_range_has_page is required to be
inclusive, so follow the rule.
Link:
http://lkml.kernel.org/r/
[email protected]
Fixes: 6be96d3ad34a ("fs: return if direct I/O will trigger writeback")
Signed-off-by: zhengbin <
[email protected]
>
Reviewed-by: Andrew Morton <
[email protected]
>
Reviewed-by: Matthew Wilcox <
[email protected]
>
Acked-by: Christoph Hellwig <
[email protected]
>
Cc: "Darrick J. Wong" <
[email protected]
>
Cc: Amir Goldstein <
[email protected]
>
Cc: Dave Chinner <
[email protected]
>
Cc: Johannes Weiner <
[email protected]
>
Cc: Hugh Dickins <
[email protected]
>
Cc: Hou Tao <
[email protected]
>
Cc: zhangyi (F) <
[email protected]
>
Cc: Jan Kara <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/filemap.c
patch
|
blob
|
history
diff --git
a/mm/filemap.c
b/mm/filemap.c
index 935fbc29aeb13a5f282133630e71340d58a97485..e59fdecdab74f3b487d1b3526d1e52f793420551 100644
(file)
--- a/
mm/filemap.c
+++ b/
mm/filemap.c
@@
-3071,7
+3071,7
@@
generic_file_direct_write(struct kiocb *iocb, struct iov_iter *from)
if (iocb->ki_flags & IOCB_NOWAIT) {
/* If there are pages to writeback, return */
if (filemap_range_has_page(inode->i_mapping, pos,
- pos + write_len))
+ pos + write_len
- 1
))
return -EAGAIN;
} else {
written = filemap_write_and_wait_range(mapping, pos,