@@ -183,6 +183,7 @@ cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb,
183183 int create_options = CREATE_NOT_DIR ;
184184 FILE_ALL_INFO * buf ;
185185 struct TCP_Server_Info * server = tcon -> ses -> server ;
186+ struct cifs_open_parms oparms ;
186187
187188 if (!server -> ops -> open )
188189 return - ENOSYS ;
@@ -224,9 +225,15 @@ cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb,
224225 if (backup_cred (cifs_sb ))
225226 create_options |= CREATE_OPEN_BACKUP_INTENT ;
226227
227- rc = server -> ops -> open (xid , tcon , full_path , disposition ,
228- desired_access , create_options , fid , oplock , buf ,
229- cifs_sb );
228+ oparms .tcon = tcon ;
229+ oparms .cifs_sb = cifs_sb ;
230+ oparms .desired_access = desired_access ;
231+ oparms .create_options = create_options ;
232+ oparms .disposition = disposition ;
233+ oparms .path = full_path ;
234+ oparms .fid = fid ;
235+
236+ rc = server -> ops -> open (xid , & oparms , oplock , buf );
230237
231238 if (rc )
232239 goto out ;
@@ -588,6 +595,7 @@ cifs_reopen_file(struct cifsFileInfo *cfile, bool can_flush)
588595 int disposition = FILE_OPEN ;
589596 int create_options = CREATE_NOT_DIR ;
590597 struct cifs_fid fid ;
598+ struct cifs_open_parms oparms ;
591599
592600 xid = get_xid ();
593601 mutex_lock (& cfile -> fh_mutex );
@@ -656,16 +664,22 @@ cifs_reopen_file(struct cifsFileInfo *cfile, bool can_flush)
656664 if (server -> ops -> get_lease_key )
657665 server -> ops -> get_lease_key (inode , & fid );
658666
667+ oparms .tcon = tcon ;
668+ oparms .cifs_sb = cifs_sb ;
669+ oparms .desired_access = desired_access ;
670+ oparms .create_options = create_options ;
671+ oparms .disposition = disposition ;
672+ oparms .path = full_path ;
673+ oparms .fid = & fid ;
674+
659675 /*
660676 * Can not refresh inode by passing in file_info buf to be returned by
661677 * CIFSSMBOpen and then calling get_inode_info with returned buf since
662678 * file might have write behind data that needs to be flushed and server
663679 * version of file size can be stale. If we knew for sure that inode was
664680 * not dirty locally we could do this.
665681 */
666- rc = server -> ops -> open (xid , tcon , full_path , disposition ,
667- desired_access , create_options , & fid , & oplock ,
668- NULL , cifs_sb );
682+ rc = server -> ops -> open (xid , & oparms , & oplock , NULL );
669683 if (rc ) {
670684 mutex_unlock (& cfile -> fh_mutex );
671685 cifs_dbg (FYI , "cifs_reopen returned 0x%x\n" , rc );
0 commit comments