linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Shyam Prasad N <nspmangalore@gmail.com>
Cc: CIFS <linux-cifs@vger.kernel.org>
Subject: Multichannel patch series
Date: Fri, 14 Jan 2022 23:51:05 -0600	[thread overview]
Message-ID: <CAH2r5mvOqDErGDenf9i2gOH5q0YOKpVs-E4HD-ZnkB33UTQ99Q@mail.gmail.com> (raw)

It looks like this change to connect.c (in
cifs-check-reconnects-for-channels-of-active-tcons) causes the problem
with DFS reconnect

@@ -4399,9 +4400,22 @@ int cifs_tree_connect(const unsigned int xid,
struct cifs_tcon *tcon, const stru
  char *tree;
  struct dfs_info3_param ref = {0};

+ /* only send once per connect */
+ spin_lock(&cifs_tcp_ses_lock);
+ if (tcon->ses->status != CifsGood ||
+     (tcon->tidStatus != CifsNew &&
+     tcon->tidStatus != CifsNeedTcon)) {
+ spin_unlock(&cifs_tcp_ses_lock);
+ return 0;
+ }
+ tcon->tidStatus = CifsInTcon;
+ spin_unlock(&cifs_tcp_ses_lock);
+
  tree = kzalloc(MAX_TREE_SIZE, GFP_KERNEL);
- if (!tree)
- return -ENOMEM;
+ if (!tree) {
+ rc = -ENOMEM;
+ goto out;
+ }

  if (tcon->ipc) {
  scnprintf(tree, MAX_TREE_SIZE, "\\\\%s\\IPC$", server->hostname);

-- 
Thanks,

Steve

                 reply	other threads:[~2022-01-15  5:51 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=CAH2r5mvOqDErGDenf9i2gOH5q0YOKpVs-E4HD-ZnkB33UTQ99Q@mail.gmail.com \
    --to=smfrench@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=nspmangalore@gmail.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).