+ mm-adjust-max-read-count-in-generic_file_buffered_read.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm: adjust max read count in generic_file_buffered_read()
has been added to the -mm tree.  Its filename is
     mm-adjust-max-read-count-in-generic_file_buffered_read.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-adjust-max-read-count-in-generic_file_buffered_read.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-adjust-max-read-count-in-generic_file_buffered_read.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Chengguang Xu <cgxu519@xxxxxxx>
Subject: mm: adjust max read count in generic_file_buffered_read()

When we try to truncate read count in generic_file_buffered_read(), should
deliver (sb->s_maxbytes - offset) as maximum count not sb->s_maxbytes
itself.

Link: http://lkml.kernel.org/r/20180719081726.3341-1-cgxu519@xxxxxxx
Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx>
Reviewed-by: Jan Kara <jack@xxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Cc: Jeff Layton <jlayton@xxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Cc: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx>
Cc: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/filemap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/filemap.c~mm-adjust-max-read-count-in-generic_file_buffered_read mm/filemap.c
--- a/mm/filemap.c~mm-adjust-max-read-count-in-generic_file_buffered_read
+++ a/mm/filemap.c
@@ -2064,7 +2064,7 @@ static ssize_t generic_file_buffered_rea
 
 	if (unlikely(*ppos >= inode->i_sb->s_maxbytes))
 		return 0;
-	iov_iter_truncate(iter, inode->i_sb->s_maxbytes);
+	iov_iter_truncate(iter, inode->i_sb->s_maxbytes - *ppos);
 
 	index = *ppos >> PAGE_SHIFT;
 	prev_index = ra->prev_pos >> PAGE_SHIFT;
_

Patches currently in -mm which might be from cgxu519@xxxxxxx are

mm-adjust-max-read-count-in-generic_file_buffered_read.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux