diff options
author | haiqing.shq <leviathan0992@gmail.com> | 2018-10-26 18:07:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-26 19:26:33 -0400 |
commit | 3cb7b121ff4dfbf202845b8ea27d9a437eae210f (patch) | |
tree | b51368c078969a0e3bc16f6e369e230f45c84a1f /mm/filemap.c | |
parent | cb4922496ae40a775a1b17025eaa1060e8991253 (diff) |
mm/filemap.c: Use existing variable
Use the variable write_len instead of ov_iter_count(from).
Link: http://lkml.kernel.org/r/1537375855-2088-1-git-send-email-leviathan0992@gmail.com
Signed-off-by: haiqing.shq <leviathan0992@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 41586009fa42..0b8c6de6d995 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -3027,7 +3027,7 @@ generic_file_direct_write(struct kiocb *iocb, struct iov_iter *from) | |||
3027 | if (iocb->ki_flags & IOCB_NOWAIT) { | 3027 | if (iocb->ki_flags & IOCB_NOWAIT) { |
3028 | /* If there are pages to writeback, return */ | 3028 | /* If there are pages to writeback, return */ |
3029 | if (filemap_range_has_page(inode->i_mapping, pos, | 3029 | if (filemap_range_has_page(inode->i_mapping, pos, |
3030 | pos + iov_iter_count(from))) | 3030 | pos + write_len)) |
3031 | return -EAGAIN; | 3031 | return -EAGAIN; |
3032 | } else { | 3032 | } else { |
3033 | written = filemap_write_and_wait_range(mapping, pos, | 3033 | written = filemap_write_and_wait_range(mapping, pos, |