All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <51764857.5010808@cn.fujitsu.com>

diff --git a/a/1.txt b/N1/1.txt
index 8b13789..8494519 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1 +1,32 @@
+>From 35947e6535d92c54cf523470cc8811e8b5fee3e5 Mon Sep 17 00:00:00 2001
+From: Gu Zheng <guz.fnst@cn.fujitsu.com>
+Date: Tue, 23 Apr 2013 16:09:04 +0800
+Subject: [PATCH] mm/filemap.c: fix criteria of calling iov_shorten() in generic_file_direct_write()
 
+generic_file_direct_write() compares 'count'(the max count we actually can write)
+with 'ocount'(the count we request to write) to see if there is need to call
+iov_shorten() to reduce number of segments and the iovec's length. If the
+'count' is equal or greater than 'ocount', there is no need to call iov_shorten()
+indeed. So the judgement should be changed:
+'if (count != ocount)' --> 'if (count < ocount)'
+
+Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
+---
+ mm/filemap.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/mm/filemap.c b/mm/filemap.c
+index e1979fd..c566b9c 100644
+--- a/mm/filemap.c
++++ b/mm/filemap.c
+@@ -2183,7 +2183,7 @@ generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
+ 	size_t		write_len;
+ 	pgoff_t		end;
+ 
+-	if (count != ocount)
++	if (count < ocount)
+ 		*nr_segs = iov_shorten((struct iovec *)iov, *nr_segs, count);
+ 
+ 	write_len = iov_length(iov, *nr_segs);
+-- 
+1.7.7
diff --git a/a/content_digest b/N1/content_digest
index de32512..c2f01f1 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -8,5 +8,37 @@
  " Jens <axboe@kernel.dk>\0"
  "\00:1\0"
  "b\0"
+ ">From 35947e6535d92c54cf523470cc8811e8b5fee3e5 Mon Sep 17 00:00:00 2001\n"
+ "From: Gu Zheng <guz.fnst@cn.fujitsu.com>\n"
+ "Date: Tue, 23 Apr 2013 16:09:04 +0800\n"
+ "Subject: [PATCH] mm/filemap.c: fix criteria of calling iov_shorten() in generic_file_direct_write()\n"
+ "\n"
+ "generic_file_direct_write() compares 'count'(the max count we actually can write)\n"
+ "with 'ocount'(the count we request to write) to see if there is need to call\n"
+ "iov_shorten() to reduce number of segments and the iovec's length. If the\n"
+ "'count' is equal or greater than 'ocount', there is no need to call iov_shorten()\n"
+ "indeed. So the judgement should be changed:\n"
+ "'if (count != ocount)' --> 'if (count < ocount)'\n"
+ "\n"
+ "Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>\n"
+ "---\n"
+ " mm/filemap.c |    2 +-\n"
+ " 1 files changed, 1 insertions(+), 1 deletions(-)\n"
+ "\n"
+ "diff --git a/mm/filemap.c b/mm/filemap.c\n"
+ "index e1979fd..c566b9c 100644\n"
+ "--- a/mm/filemap.c\n"
+ "+++ b/mm/filemap.c\n"
+ "@@ -2183,7 +2183,7 @@ generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,\n"
+ " \tsize_t\t\twrite_len;\n"
+ " \tpgoff_t\t\tend;\n"
+ " \n"
+ "-\tif (count != ocount)\n"
+ "+\tif (count < ocount)\n"
+ " \t\t*nr_segs = iov_shorten((struct iovec *)iov, *nr_segs, count);\n"
+ " \n"
+ " \twrite_len = iov_length(iov, *nr_segs);\n"
+ "-- \n"
+ 1.7.7
 
-7383bba652c8e2e6688e0d1705b4025c1a3118d91f765690bb9a2dc6f6559c54
+0de4276f5c263e2cc4850e6568eea02d1217ecf6a6b6c1bec813c33c011ec8fa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.