diff options
author | Gordon Ross <gordon.ross@tintri.com> | 2021-06-09 21:27:24 -0400 |
---|---|---|
committer | Gordon Ross <gordon.ross@tintri.com> | 2021-07-15 15:43:31 -0400 |
commit | 0ce4dc6f60780f39ce4f196fc1b9804379141eb7 (patch) | |
tree | 235f8b26f92f296bad44d6f39a3b786c61d845d2 | |
parent | af7caad8ef15f00fc4dffc1b827b4292ff0db62c (diff) | |
download | illumos-joyent-0ce4dc6f60780f39ce4f196fc1b9804379141eb7.tar.gz |
13874 SMB durable handle reclaim lease sometimes fails
Reviewed by: Matt Barden <mbarden@tintri.com>
Reviewed by: Prashanth Badari <prbadari@tintri.com>
Reviewed by: Andrew Stormont <astormont@racktopsystems.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Garrett D'Amore <garrett@damore.org>
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb2_durable.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/src/uts/common/fs/smbsrv/smb2_durable.c b/usr/src/uts/common/fs/smbsrv/smb2_durable.c index 41bd824b60..c783cd9659 100644 --- a/usr/src/uts/common/fs/smbsrv/smb2_durable.c +++ b/usr/src/uts/common/fs/smbsrv/smb2_durable.c @@ -179,6 +179,8 @@ preserve_some: /* preserve_opens == SMB2_DH_PRESERVE_SOME */ switch (of->dh_vers) { + uint32_t ol_state; + case SMB2_RESILIENT: return (B_TRUE); @@ -188,7 +190,11 @@ preserve_some: /* FALLTHROUGH */ case SMB2_DURABLE_V1: /* IS durable (v1 or v2) */ - if ((of->f_oplock.og_state & (OPLOCK_LEVEL_BATCH | + if (of->f_lease != NULL) + ol_state = of->f_lease->ls_state; + else + ol_state = of->f_oplock.og_state; + if ((ol_state & (OPLOCK_LEVEL_BATCH | OPLOCK_LEVEL_CACHE_HANDLE)) != 0) return (B_TRUE); /* FALLTHROUGH */ |