summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Ross <gordon.ross@tintri.com>2021-03-01 12:25:19 -0500
committerGordon Ross <gordon.ross@tintri.com>2021-06-07 18:01:56 -0400
commita9931e68d716928f41c32ca936a443c797116f9c (patch)
tree8d9cf5a237d82a6893cad7b2484f6ebaf4317d55
parent37fc8a1f73579421d8ec5a9ffdbfb472c71b6fac (diff)
downloadillumos-joyent-a9931e68d716928f41c32ca936a443c797116f9c.tar.gz
13850 SMB session logoff stuck in smb_ofile_hold_olbrk
Reviewed by: Evan Layton <elayton@tintri.com> Reviewed by: Matt Barden <mbarden@tintri.com> Reviewed by: Alexander Stetsenko <alex.stetsenko@gmail.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r--usr/src/uts/common/fs/smbsrv/smb2_lease.c4
-rw-r--r--usr/src/uts/common/fs/smbsrv/smb_srv_oplock.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/usr/src/uts/common/fs/smbsrv/smb2_lease.c b/usr/src/uts/common/fs/smbsrv/smb2_lease.c
index b4d0aef349..a23f474cec 100644
--- a/usr/src/uts/common/fs/smbsrv/smb2_lease.c
+++ b/usr/src/uts/common/fs/smbsrv/smb2_lease.c
@@ -10,7 +10,7 @@
*/
/*
- * Copyright 2020 Nexenta by DDN, Inc. All rights reserved.
+ * Copyright 2021 Tintri by DDN, Inc. All rights reserved.
*/
/*
@@ -706,7 +706,7 @@ smb2_lease_ofile_close(smb_ofile_t *ofile)
if (o->f_oplock.og_closing)
continue;
/* If we can get a hold, use this ofile. */
- if (smb_ofile_hold_olbrk(o))
+ if (smb_ofile_hold(o))
break;
}
if (o == NULL) {
diff --git a/usr/src/uts/common/fs/smbsrv/smb_srv_oplock.c b/usr/src/uts/common/fs/smbsrv/smb_srv_oplock.c
index 12d425d438..d4811f6857 100644
--- a/usr/src/uts/common/fs/smbsrv/smb_srv_oplock.c
+++ b/usr/src/uts/common/fs/smbsrv/smb_srv_oplock.c
@@ -10,7 +10,7 @@
*/
/*
- * Copyright 2019 Nexenta by DDN, Inc. All rights reserved.
+ * Copyright 2021 Tintri by DDN, Inc. All rights reserved.
*/
/*
@@ -173,7 +173,8 @@ smb_oplock_ind_break_in_ack(smb_request_t *ack_sr, smb_ofile_t *ofile,
* We're going to schedule a request that will have a
* reference to this ofile. Get the hold first.
*/
- if (!smb_ofile_hold_olbrk(ofile)) {
+ if (ofile->f_oplock.og_closing ||
+ !smb_ofile_hold_olbrk(ofile)) {
/* It's closing (or whatever). Nothing to do. */
return;
}
@@ -264,7 +265,8 @@ smb_oplock_ind_break(smb_ofile_t *ofile, uint32_t NewLevel,
* We're going to schedule a request that will have a
* reference to this ofile. Get the hold first.
*/
- if (!smb_ofile_hold_olbrk(ofile)) {
+ if (ofile->f_oplock.og_closing ||
+ !smb_ofile_hold_olbrk(ofile)) {
/* It's closing (or whatever). Nothing to do. */
return;
}