diff for duplicates of <20080601231501.299324279@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 9e1d270..ff22d02 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,3 +1,46 @@ -An embedded and charset-unspecified text was scrubbed... -Name: ocfs2-use-simple-read-from-buffer.patch -Url: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20080601/16c60448/attachment.pl +Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> +Cc: Mark Fasheh <mfasheh@suse.com> +Cc: Joel Becker <joel.becker@oracle.com> +Cc: ocfs2-devel@oss.oracle.com +--- + fs/ocfs2/stack_user.c | 19 +++++-------------- + 1 file changed, 5 insertions(+), 14 deletions(-) + +Index: 2.6-git/fs/ocfs2/stack_user.c +=================================================================== +--- 2.6-git.orig/fs/ocfs2/stack_user.c ++++ 2.6-git/fs/ocfs2/stack_user.c +@@ -549,26 +549,17 @@ static ssize_t ocfs2_control_read(struct + size_t count, + loff_t *ppos) + { +- char *proto_string = OCFS2_CONTROL_PROTO; +- size_t to_write = 0; ++ ssize_t ret; + +- if (*ppos >= OCFS2_CONTROL_PROTO_LEN) +- return 0; +- +- to_write = OCFS2_CONTROL_PROTO_LEN - *ppos; +- if (to_write > count) +- to_write = count; +- if (copy_to_user(buf, proto_string + *ppos, to_write)) +- return -EFAULT; +- +- *ppos += to_write; ++ ret = simple_read_from_buffer(buf, count, ppos, ++ OCFS2_CONTROL_PROTO, OCFS2_CONTROL_PROTO_LEN); + + /* Have we read the whole protocol list? */ +- if (*ppos >= OCFS2_CONTROL_PROTO_LEN) ++ if (ret > 0 && *ppos >= OCFS2_CONTROL_PROTO_LEN) + ocfs2_control_set_handshake_state(file, + OCFS2_CONTROL_HANDSHAKE_READ); + +- return to_write; ++ return ret; + } + + static int ocfs2_control_release(struct inode *inode, struct file *file) + +-- diff --git a/a/content_digest b/N1/content_digest index 5af0808..72097ec 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,15 +1,59 @@ "ref\020080601231329.223608711@gmail.com\0" - "From\0akinobu.mita at gmail.com <akinobu.mita@gmail.com>\0" - "Subject\0[Ocfs2-devel] [patch -v2 03/23] ocfs2: use simple_read_from_buffer\0" - "Date\0Sun, 01 Jun 2008 23:27:25 -0000\0" + "From\0akinobu.mita@gmail.com\0" + "Subject\0[patch -v2 03/23] ocfs2: use simple_read_from_buffer\0" + "Date\0Mon, 02 Jun 2008 08:13:32 +0900\0" "To\0linux-kernel@vger.kernel.org\0" "Cc\0Mark Fasheh <mfasheh@suse.com>" Joel Becker <joel.becker@oracle.com> " ocfs2-devel@oss.oracle.com\0" "\00:1\0" + "fn\0ocfs2-use-simple-read-from-buffer.patch\0" "b\0" - "An embedded and charset-unspecified text was scrubbed...\n" - "Name: ocfs2-use-simple-read-from-buffer.patch\n" - Url: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20080601/16c60448/attachment.pl + "Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>\n" + "Cc: Mark Fasheh <mfasheh@suse.com>\n" + "Cc: Joel Becker <joel.becker@oracle.com>\n" + "Cc: ocfs2-devel@oss.oracle.com \n" + "---\n" + " fs/ocfs2/stack_user.c | 19 +++++--------------\n" + " 1 file changed, 5 insertions(+), 14 deletions(-)\n" + "\n" + "Index: 2.6-git/fs/ocfs2/stack_user.c\n" + "===================================================================\n" + "--- 2.6-git.orig/fs/ocfs2/stack_user.c\n" + "+++ 2.6-git/fs/ocfs2/stack_user.c\n" + "@@ -549,26 +549,17 @@ static ssize_t ocfs2_control_read(struct\n" + " \t\t\t\t size_t count,\n" + " \t\t\t\t loff_t *ppos)\n" + " {\n" + "-\tchar *proto_string = OCFS2_CONTROL_PROTO;\n" + "-\tsize_t to_write = 0;\n" + "+\tssize_t ret;\n" + " \n" + "-\tif (*ppos >= OCFS2_CONTROL_PROTO_LEN)\n" + "-\t\treturn 0;\n" + "-\n" + "-\tto_write = OCFS2_CONTROL_PROTO_LEN - *ppos;\n" + "-\tif (to_write > count)\n" + "-\t\tto_write = count;\n" + "-\tif (copy_to_user(buf, proto_string + *ppos, to_write))\n" + "-\t\treturn -EFAULT;\n" + "-\n" + "-\t*ppos += to_write;\n" + "+\tret = simple_read_from_buffer(buf, count, ppos,\n" + "+\t\t\tOCFS2_CONTROL_PROTO, OCFS2_CONTROL_PROTO_LEN);\n" + " \n" + " \t/* Have we read the whole protocol list? */\n" + "-\tif (*ppos >= OCFS2_CONTROL_PROTO_LEN)\n" + "+\tif (ret > 0 && *ppos >= OCFS2_CONTROL_PROTO_LEN)\n" + " \t\tocfs2_control_set_handshake_state(file,\n" + " \t\t\t\t\t\t OCFS2_CONTROL_HANDSHAKE_READ);\n" + " \n" + "-\treturn to_write;\n" + "+\treturn ret;\n" + " }\n" + " \n" + " static int ocfs2_control_release(struct inode *inode, struct file *file)\n" + "\n" + -- -6e5c9086ec3db67789bb9137699f9ae8e2591a1cdafa6fc979761a197f09b73e +6cfaa640a3a32ab55b6d67d8f2da6c77d1ea5849a49e055d711f28fc35a0c345
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.