* [PATCH -next] cifs: fix wrong unlock before return from cifs_tree_connect()
@ 2022-07-29 7:49 Yang Yingliang
2022-07-29 15:34 ` Steve French
0 siblings, 1 reply; 3+ messages in thread
From: Yang Yingliang @ 2022-07-29 7:49 UTC (permalink / raw)
To: linux-kernel, linux-cifs; +Cc: sprasad, stfrench
It should unlock 'tcon->tc_lock' before return from cifs_tree_connect().
Fixes: fe67bd563ec2 ("cifs: avoid use of global locks for high contention data")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
fs/cifs/connect.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 931d4b6fafc8..1362210f3ece 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -4583,7 +4583,7 @@ int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const stru
if (tcon->ses->ses_status != SES_GOOD ||
(tcon->status != TID_NEW &&
tcon->status != TID_NEED_TCON)) {
- spin_unlock(&tcon->ses->ses_lock);
+ spin_unlock(&tcon->tc_lock);
return 0;
}
tcon->status = TID_IN_TCON;
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] cifs: fix wrong unlock before return from cifs_tree_connect()
2022-07-29 7:49 [PATCH -next] cifs: fix wrong unlock before return from cifs_tree_connect() Yang Yingliang
@ 2022-07-29 15:34 ` Steve French
2022-08-01 2:32 ` Shyam Prasad N
0 siblings, 1 reply; 3+ messages in thread
From: Steve French @ 2022-07-29 15:34 UTC (permalink / raw)
To: Yang Yingliang; +Cc: LKML, CIFS, Shyam Prasad N, Steve French
merged into cifs-2.6.git for-next
On Fri, Jul 29, 2022 at 2:45 AM Yang Yingliang <yangyingliang@huawei.com> wrote:
>
> It should unlock 'tcon->tc_lock' before return from cifs_tree_connect().
>
> Fixes: fe67bd563ec2 ("cifs: avoid use of global locks for high contention data")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> fs/cifs/connect.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index 931d4b6fafc8..1362210f3ece 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -4583,7 +4583,7 @@ int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const stru
> if (tcon->ses->ses_status != SES_GOOD ||
> (tcon->status != TID_NEW &&
> tcon->status != TID_NEED_TCON)) {
> - spin_unlock(&tcon->ses->ses_lock);
> + spin_unlock(&tcon->tc_lock);
> return 0;
> }
> tcon->status = TID_IN_TCON;
> --
> 2.25.1
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] cifs: fix wrong unlock before return from cifs_tree_connect()
2022-07-29 15:34 ` Steve French
@ 2022-08-01 2:32 ` Shyam Prasad N
0 siblings, 0 replies; 3+ messages in thread
From: Shyam Prasad N @ 2022-08-01 2:32 UTC (permalink / raw)
To: Steve French; +Cc: Yang Yingliang, LKML, CIFS, Shyam Prasad N, Steve French
On Fri, Jul 29, 2022 at 9:08 PM Steve French <smfrench@gmail.com> wrote:
>
> merged into cifs-2.6.git for-next
>
> On Fri, Jul 29, 2022 at 2:45 AM Yang Yingliang <yangyingliang@huawei.com> wrote:
> >
> > It should unlock 'tcon->tc_lock' before return from cifs_tree_connect().
> >
> > Fixes: fe67bd563ec2 ("cifs: avoid use of global locks for high contention data")
> > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> > ---
> > fs/cifs/connect.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> > index 931d4b6fafc8..1362210f3ece 100644
> > --- a/fs/cifs/connect.c
> > +++ b/fs/cifs/connect.c
> > @@ -4583,7 +4583,7 @@ int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon, const stru
> > if (tcon->ses->ses_status != SES_GOOD ||
> > (tcon->status != TID_NEW &&
> > tcon->status != TID_NEED_TCON)) {
> > - spin_unlock(&tcon->ses->ses_lock);
> > + spin_unlock(&tcon->tc_lock);
> > return 0;
> > }
> > tcon->status = TID_IN_TCON;
> > --
> > 2.25.1
> >
>
>
> --
> Thanks,
>
> Steve
Good catch. Looks good to me.
--
Regards,
Shyam
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-01 2:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-29 7:49 [PATCH -next] cifs: fix wrong unlock before return from cifs_tree_connect() Yang Yingliang
2022-07-29 15:34 ` Steve French
2022-08-01 2:32 ` Shyam Prasad N
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.