@@ -177,8 +177,9 @@ cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb,
177177 int disposition ;
178178 int create_options = CREATE_NOT_DIR ;
179179 FILE_ALL_INFO * buf ;
180+ struct TCP_Server_Info * server = tcon -> ses -> server ;
180181
181- if (!tcon -> ses -> server -> ops -> open )
182+ if (!server -> ops -> open )
182183 return - ENOSYS ;
183184
184185 desired_access = cifs_convert_flags (f_flags );
@@ -218,9 +219,9 @@ cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb,
218219 if (backup_cred (cifs_sb ))
219220 create_options |= CREATE_OPEN_BACKUP_INTENT ;
220221
221- rc = tcon -> ses -> server -> ops -> open (xid , tcon , full_path , disposition ,
222- desired_access , create_options , fid ,
223- oplock , buf , cifs_sb );
222+ rc = server -> ops -> open (xid , tcon , full_path , disposition ,
223+ desired_access , create_options , fid , oplock , buf ,
224+ cifs_sb );
224225
225226 if (rc )
226227 goto out ;
@@ -372,6 +373,7 @@ int cifs_open(struct inode *inode, struct file *file)
372373 unsigned int xid ;
373374 __u32 oplock ;
374375 struct cifs_sb_info * cifs_sb ;
376+ struct TCP_Server_Info * server ;
375377 struct cifs_tcon * tcon ;
376378 struct tcon_link * tlink ;
377379 struct cifsFileInfo * cfile = NULL ;
@@ -388,6 +390,7 @@ int cifs_open(struct inode *inode, struct file *file)
388390 return PTR_ERR (tlink );
389391 }
390392 tcon = tlink_tcon (tlink );
393+ server = tcon -> ses -> server ;
391394
392395 full_path = build_path_from_dentry (file -> f_path .dentry );
393396 if (full_path == NULL ) {
@@ -432,6 +435,9 @@ int cifs_open(struct inode *inode, struct file *file)
432435 }
433436
434437 if (!posix_open_ok ) {
438+ if (server -> ops -> get_lease_key )
439+ server -> ops -> get_lease_key (inode , & fid );
440+
435441 rc = cifs_nt_open (full_path , inode , cifs_sb , tcon ,
436442 file -> f_flags , & oplock , & fid , xid );
437443 if (rc )
@@ -440,8 +446,8 @@ int cifs_open(struct inode *inode, struct file *file)
440446
441447 cfile = cifs_new_fileinfo (& fid , file , tlink , oplock );
442448 if (cfile == NULL ) {
443- if (tcon -> ses -> server -> ops -> close )
444- tcon -> ses -> server -> ops -> close (xid , tcon , & fid );
449+ if (server -> ops -> close )
450+ server -> ops -> close (xid , tcon , & fid );
445451 rc = - ENOMEM ;
446452 goto out ;
447453 }
@@ -567,6 +573,9 @@ cifs_reopen_file(struct cifsFileInfo *cfile, bool can_flush)
567573 if (backup_cred (cifs_sb ))
568574 create_options |= CREATE_OPEN_BACKUP_INTENT ;
569575
576+ if (server -> ops -> get_lease_key )
577+ server -> ops -> get_lease_key (inode , & fid );
578+
570579 /*
571580 * Can not refresh inode by passing in file_info buf to be returned by
572581 * CIFSSMBOpen and then calling get_inode_info with returned buf since
0 commit comments