--- ./source/private_module/smb2/smb2_read.c	2021-06-29 16:25:43.266401100 +0000
+++ ./source/private_module/smb2/smb2_read.c.hotpatch	2021-06-29 16:13:14.602401100 +0000
@@ -37,7 +37,7 @@
 
 #define SMB2_READ_REQ_STRUCTSIZE 49
 #define SMB2_READ_RSP_STRUCTSIZE 17
-
+#define SMB_CFG_TESTLOCK_OPEN_BIT  0x80000000
 static void smb2_audit_read_file(struct smb2_request* request, u64 offset, u32 count, struct smb2_open* open)
 {
     int ret = NAS_OK;
@@ -519,7 +519,7 @@
 }
 
 #endif
-
+extern u32 tenant_zero_reservebit;
 /**************************************************************************
   Namesmb2_read_lock_access_start
   Description process the smb2 check lock conflict
@@ -539,7 +539,7 @@
 	
 	/*򿪵ļڱͻ򿪶дȥtestlock*/
     if (STYPE_ISDSK(request->pTree->Share->shr_type) 
-        && (g_smb_cfg.test_lock_enable & SMB2_READ_TEST_LOCK_ENABLE)
+        && (g_smb_cfg.test_lock_enable & SMB2_READ_TEST_LOCK_ENABLE) && ((tenant_zero_reservebit & SMB_CFG_TESTLOCK_OPEN_BIT) == 0)
         && request->Open
         && !request->Open->anti_virus_data.is_scan_virus_op)
     {
--- ./source/private_module/smb2/smb2_write.c	2021-06-29 16:25:43.266401100 +0000
+++ ./source/private_module/smb2/smb2_write.c.hotpatch	2021-06-29 16:13:14.602401100 +0000
@@ -38,7 +38,7 @@
 #define SMB2_WRITE_TEST_LOCK_ENABLE 0x01
 #define SMB2_WRITE_REQ_STRUCTSIZE 49
 #define SMB2_WRITE_RSP_STRUCTSIZE 17
-
+#define SMB_CFG_TESTLOCK_OPEN_BIT 0x80000000
 static int smb_write_fill_uio( struct svc_rqst* rqstp, smb_vdb_t*    pVdb);
 
 static void smb2_audit_write(struct smb2_request* request, u64 offset, u32 count, smb2_open_t* open)
@@ -541,7 +541,7 @@
     return ntfs_zerocopy_write(&request->nreq, (nas_file_t *)open->locolopen, &vdb->vdb_zero, writeflag);
 }
 #endif
-
+extern u32 tenant_zero_reservebit;
 /**************************************************************************
   Namesmb2_write_lock_access_start
   Description process the smb2 check lock conflict
@@ -562,7 +562,7 @@
 	smb2_statistics_internal_rtt_begin(SMB2_RTT_WRITE_LOCK, &request->rtt_time);
 	
     if(STYPE_ISDSK(request->pTree->Share->shr_type) 
-        && (g_smb_cfg.test_lock_enable & SMB2_WRITE_TEST_LOCK_ENABLE))
+        && (g_smb_cfg.test_lock_enable & SMB2_WRITE_TEST_LOCK_ENABLE) && ((tenant_zero_reservebit & SMB_CFG_TESTLOCK_OPEN_BIT) == 0))
     {
         request->nreq.iod_req = pReq;
         ret = smb2_lock_range_access(request, req->FileId.Persistent,req->Offset,(u64)req->Length,SMB_WRLCK);
