stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: smfrench@gmail.com, gregkh@linuxfoundation.org,
	steve.french@primarydata.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "Do not send SMB3 SET_INFO request if nothing is changing" has been added to the 4.8-stable tree
Date: Wed, 26 Oct 2016 11:25:06 +0200	[thread overview]
Message-ID: <147747390611063@kroah.com> (raw)


This is a note to let you know that I've just added the patch titled

    Do not send SMB3 SET_INFO request if nothing is changing

to the 4.8-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-send-smb3-set_info-request-if-nothing-is-changing.patch
and it can be found in the queue-4.8 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 18dd8e1a65ddae2351d0f0d6dd4a334f441fc5fa Mon Sep 17 00:00:00 2001
From: Steve French <smfrench@gmail.com>
Date: Mon, 26 Sep 2016 14:23:08 -0500
Subject: Do not send SMB3 SET_INFO request if nothing is changing

From: Steve French <smfrench@gmail.com>

commit 18dd8e1a65ddae2351d0f0d6dd4a334f441fc5fa upstream.

[CIFS] We had cases where we sent a SMB2/SMB3 setinfo request with all
timestamp (and DOS attribute) fields marked as 0 (ie do not change)
e.g. on chmod or chown.

Signed-off-by: Steve French <steve.french@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/cifs/smb2inode.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/fs/cifs/smb2inode.c
+++ b/fs/cifs/smb2inode.c
@@ -266,9 +266,15 @@ smb2_set_file_info(struct inode *inode,
 	struct tcon_link *tlink;
 	int rc;
 
+	if ((buf->CreationTime == 0) && (buf->LastAccessTime == 0) &&
+	    (buf->LastWriteTime == 0) && (buf->ChangeTime) &&
+	    (buf->Attributes == 0))
+		return 0; /* would be a no op, no sense sending this */
+
 	tlink = cifs_sb_tlink(cifs_sb);
 	if (IS_ERR(tlink))
 		return PTR_ERR(tlink);
+
 	rc = smb2_open_op_close(xid, tlink_tcon(tlink), cifs_sb, full_path,
 				FILE_WRITE_ATTRIBUTES, FILE_OPEN, 0, buf,
 				SMB2_OP_SET_INFO);


Patches currently in stable-queue which might be from smfrench@gmail.com are

queue-4.8/fix-regression-which-breaks-dfs-mounting.patch
queue-4.8/cleanup-missing-frees-on-some-ioctls.patch
queue-4.8/smb3-guids-should-be-constructed-as-random-but-valid-uuids.patch
queue-4.8/clarify-locking-of-cifs-file-and-tcon-structures-and-make-more-granular.patch
queue-4.8/do-not-send-smb3-set_info-request-if-nothing-is-changing.patch
queue-4.8/set-previous-session-id-correctly-on-smb3-reconnect.patch
queue-4.8/cifs-limit-the-overall-credit-acquired.patch
queue-4.8/fs-cifs-keep-guid-when-assigning-fid-to-fileinfo.patch
queue-4.8/display-number-of-credits-available.patch

                 reply	other threads:[~2016-10-26  9:25 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=147747390611063@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=smfrench@gmail.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=steve.french@primarydata.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).