Linux-CIFS Archive mirror
 help / color / mirror / Atom feed
From: Shyam Prasad N <nspmangalore@gmail.com>
To: Steve French <smfrench@gmail.com>
Cc: Henrique Carvalho <henrique.carvalho@suse.com>,
	sfrench@samba.org, sprasad@microsoft.com,  pc@manguebit.org,
	ronniesahlberg@gmail.com, tom@talpey.com,
	 bharathsm@microsoft.com, ematsumiya@suse.de,
	linux-cifs@vger.kernel.org
Subject: Re: [PATCH] smb: client: fix cifs_pick_channel when channel needs reconnect
Date: Sat, 8 Nov 2025 09:40:47 +0530	[thread overview]
Message-ID: <CANT5p=rqcPr86R4Dz3jXaHY8w2M9JxSqUcHMg1fjegNp8Sza+w@mail.gmail.com> (raw)
In-Reply-To: <CAH2r5mt979CqEHa8wTEV3U+qCVnBqB2N7fCYynQqE2=214Cy7A@mail.gmail.com>

On Sat, Nov 8, 2025 at 4:46 AM Steve French <smfrench@gmail.com> wrote:
>
> merged into cifs-2.6.git for-next pending additional review and testing
>
> On Fri, Nov 7, 2025 at 4:03 PM Henrique Carvalho
> <henrique.carvalho@suse.com> wrote:
> >
> > cifs_pick_channel iterates candidate channels using cur. The
> > reconnect-state test mistakenly used a different variable.
> >
> > This checked the wrong slot and would cause us to skip a healthy channel
> > and to dispatch on one that needs reconnect, occasionally failing
> > operations when a channel was down.
> >
> > Fix by replacing for the correct variable.
> >
> > Fixes: fc43a8ac396d ("cifs: cifs_pick_channel should try selecting active channels")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
> > ---
> >  fs/smb/client/transport.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/smb/client/transport.c b/fs/smb/client/transport.c
> > index 051cd9dbba13..915cedde5d66 100644
> > --- a/fs/smb/client/transport.c
> > +++ b/fs/smb/client/transport.c
> > @@ -830,7 +830,7 @@ struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses)
> >                 if (!server || server->terminate)
> >                         continue;
> >
> > -               if (CIFS_CHAN_NEEDS_RECONNECT(ses, i))
> > +               if (CIFS_CHAN_NEEDS_RECONNECT(ses, cur))
> >                         continue;
> >
> >                 /*
> > --
> > 2.50.1
> >
> >
>
>
> --
> Thanks,
>
> Steve
>

Good spot. I think reordering of patches may have caused this to regress.
Changes look good to me. Please add my RB and CC stable.

-- 
Regards,
Shyam

  reply	other threads:[~2025-11-08  4:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 21:59 [PATCH] smb: client: fix cifs_pick_channel when channel needs reconnect Henrique Carvalho
2025-11-07 23:13 ` Steve French
2025-11-08  4:10   ` Shyam Prasad N [this message]
2025-11-08  4:20     ` Steve French

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='CANT5p=rqcPr86R4Dz3jXaHY8w2M9JxSqUcHMg1fjegNp8Sza+w@mail.gmail.com' \
    --to=nspmangalore@gmail.com \
    --cc=bharathsm@microsoft.com \
    --cc=ematsumiya@suse.de \
    --cc=henrique.carvalho@suse.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=pc@manguebit.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=sfrench@samba.org \
    --cc=smfrench@gmail.com \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.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 read-only IMAP folder(s) and NNTP newsgroup(s).