|
@@ -183,6 +183,7 @@ cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb,
|
|
|
int create_options = CREATE_NOT_DIR;
|
|
|
FILE_ALL_INFO *buf;
|
|
|
struct TCP_Server_Info *server = tcon->ses->server;
|
|
|
+ struct cifs_open_parms oparms;
|
|
|
|
|
|
if (!server->ops->open)
|
|
|
return -ENOSYS;
|
|
@@ -224,9 +225,15 @@ cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb,
|
|
|
if (backup_cred(cifs_sb))
|
|
|
create_options |= CREATE_OPEN_BACKUP_INTENT;
|
|
|
|
|
|
- rc = server->ops->open(xid, tcon, full_path, disposition,
|
|
|
- desired_access, create_options, fid, oplock, buf,
|
|
|
- cifs_sb);
|
|
|
+ oparms.tcon = tcon;
|
|
|
+ oparms.cifs_sb = cifs_sb;
|
|
|
+ oparms.desired_access = desired_access;
|
|
|
+ oparms.create_options = create_options;
|
|
|
+ oparms.disposition = disposition;
|
|
|
+ oparms.path = full_path;
|
|
|
+ oparms.fid = fid;
|
|
|
+
|
|
|
+ rc = server->ops->open(xid, &oparms, oplock, buf);
|
|
|
|
|
|
if (rc)
|
|
|
goto out;
|
|
@@ -588,6 +595,7 @@ cifs_reopen_file(struct cifsFileInfo *cfile, bool can_flush)
|
|
|
int disposition = FILE_OPEN;
|
|
|
int create_options = CREATE_NOT_DIR;
|
|
|
struct cifs_fid fid;
|
|
|
+ struct cifs_open_parms oparms;
|
|
|
|
|
|
xid = get_xid();
|
|
|
mutex_lock(&cfile->fh_mutex);
|
|
@@ -656,6 +664,14 @@ cifs_reopen_file(struct cifsFileInfo *cfile, bool can_flush)
|
|
|
if (server->ops->get_lease_key)
|
|
|
server->ops->get_lease_key(inode, &fid);
|
|
|
|
|
|
+ oparms.tcon = tcon;
|
|
|
+ oparms.cifs_sb = cifs_sb;
|
|
|
+ oparms.desired_access = desired_access;
|
|
|
+ oparms.create_options = create_options;
|
|
|
+ oparms.disposition = disposition;
|
|
|
+ oparms.path = full_path;
|
|
|
+ oparms.fid = &fid;
|
|
|
+
|
|
|
/*
|
|
|
* Can not refresh inode by passing in file_info buf to be returned by
|
|
|
* CIFSSMBOpen and then calling get_inode_info with returned buf since
|
|
@@ -663,9 +679,7 @@ cifs_reopen_file(struct cifsFileInfo *cfile, bool can_flush)
|
|
|
* version of file size can be stale. If we knew for sure that inode was
|
|
|
* not dirty locally we could do this.
|
|
|
*/
|
|
|
- rc = server->ops->open(xid, tcon, full_path, disposition,
|
|
|
- desired_access, create_options, &fid, &oplock,
|
|
|
- NULL, cifs_sb);
|
|
|
+ rc = server->ops->open(xid, &oparms, &oplock, NULL);
|
|
|
if (rc) {
|
|
|
mutex_unlock(&cfile->fh_mutex);
|
|
|
cifs_dbg(FYI, "cifs_reopen returned 0x%x\n", rc);
|