From: <gregkh@linuxfoundation.org>
To: sprabhu@redhat.com, eguan@redhat.com, gregkh@linuxfoundation.org,
pshilov@microsoft.com, smfrench@gmail.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "Do not return number of bytes written for ioctl CIFS_IOC_COPYCHUNK_FILE" has been added to the 4.11-stable tree
Date: Wed, 17 May 2017 17:55:54 +0200 [thread overview]
Message-ID: <1495036554155244@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
Do not return number of bytes written for ioctl CIFS_IOC_COPYCHUNK_FILE
to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
do-not-return-number-of-bytes-written-for-ioctl-cifs_ioc_copychunk_file.patch
and it can be found in the queue-4.11 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 7d0c234fd2e1c9ca3fa032696c0c58b1b74a9e0b Mon Sep 17 00:00:00 2001
From: Sachin Prabhu <sprabhu@redhat.com>
Date: Wed, 26 Apr 2017 17:10:17 +0100
Subject: Do not return number of bytes written for ioctl CIFS_IOC_COPYCHUNK_FILE
From: Sachin Prabhu <sprabhu@redhat.com>
commit 7d0c234fd2e1c9ca3fa032696c0c58b1b74a9e0b upstream.
commit 620d8745b35d ("Introduce cifs_copy_file_range()") changes the
behaviour of the cifs ioctl call CIFS_IOC_COPYCHUNK_FILE. In case of
successful writes, it now returns the number of bytes written. This
return value is treated as an error by the xfstest cifs/001. Depending
on the errno set at that time, this may or may not result in the test
failing.
The patch fixes this by setting the return value to 0 in case of
successful writes.
Fixes: commit 620d8745b35d ("Introduce cifs_copy_file_range()")
Reported-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Acked-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/cifs/ioctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/cifs/ioctl.c
+++ b/fs/cifs/ioctl.c
@@ -74,7 +74,8 @@ static long cifs_ioctl_copychunk(unsigne
rc = cifs_file_copychunk_range(xid, src_file.file, 0, dst_file, 0,
src_inode->i_size, 0);
-
+ if (rc > 0)
+ rc = 0;
out_fput:
fdput(src_file);
out_drop_write:
Patches currently in stable-queue which might be from sprabhu@redhat.com are
queue-4.11/do-not-return-number-of-bytes-written-for-ioctl-cifs_ioc_copychunk_file.patch
queue-4.11/fix-match_prepath.patch
reply other threads:[~2017-05-17 15:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1495036554155244@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=eguan@redhat.com \
--cc=pshilov@microsoft.com \
--cc=smfrench@gmail.com \
--cc=sprabhu@redhat.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.