diff for duplicates of <20080604115711.088785233@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 523599d..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/20080604/8f2bb6db/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 e63314e..c3f5ba9 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,16 +1,60 @@ "ref\020080604115633.116832712@gmail.com\0" "From\0Akinobu Mita <akinobu.mita@gmail.com>\0" - "Subject\0[Ocfs2-devel] [patch -v3 02/22] ocfs2: use simple_read_from_buffer\0" - "Date\0Wed, 04 Jun 2008 12:09:58 -0000\0" + "Subject\0[patch -v3 02/22] ocfs2: use simple_read_from_buffer\0" + "Date\0Wed, 04 Jun 2008 20:56:35 +0900\0" "To\0linux-kernel@vger.kernel.org" " akpm@linux-foundation.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/20080604/8f2bb6db/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" + -- -cb47bbf1f031585e850d376466261255d192165ebbde220bc9e39aa178eed44b +5d90a5e0389ce9f082b57acaa9de28ed97cea93d295223047f36f9567d8c3547
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.