aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2file.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2013-07-05 12:00:30 +0400
committerSteve French <smfrench@gmail.com>2013-07-10 13:08:40 -0500
commit226730b4d8adae393dc07092655cdd29d2a2ff07 (patch)
treeeda0aef086114d0309d669e01c22a0ec5d987cc5 /fs/cifs/smb2file.c
parentCIFS: Request durable open for SMB2 opens (diff)
downloadlinux-dev-226730b4d8adae393dc07092655cdd29d2a2ff07.tar.xz
linux-dev-226730b4d8adae393dc07092655cdd29d2a2ff07.zip
CIFS: Introduce cifs_open_parms struct
and pass it to the open() call. Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steven French <steven@steven-GA-970A-DS3.(none)>
Diffstat (limited to 'fs/cifs/smb2file.c')
-rw-r--r--fs/cifs/smb2file.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c
index 150a9b1bc7fa..5bab192f64e8 100644
--- a/fs/cifs/smb2file.c
+++ b/fs/cifs/smb2file.c
@@ -57,17 +57,16 @@ smb2_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock)
}
int
-smb2_open_file(const unsigned int xid, struct cifs_tcon *tcon, const char *path,
- int disposition, int desired_access, int create_options,
- struct cifs_fid *fid, __u32 *oplock, FILE_ALL_INFO *buf,
- struct cifs_sb_info *cifs_sb)
+smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms,
+ __u32 *oplock, FILE_ALL_INFO *buf)
{
int rc;
__le16 *smb2_path;
struct smb2_file_all_info *smb2_data = NULL;
__u8 smb2_oplock[17];
+ struct cifs_fid *fid = oparms->fid;
- smb2_path = cifs_convert_path_to_utf16(path, cifs_sb);
+ smb2_path = cifs_convert_path_to_utf16(oparms->path, oparms->cifs_sb);
if (smb2_path == NULL) {
rc = -ENOMEM;
goto out;
@@ -80,21 +79,22 @@ smb2_open_file(const unsigned int xid, struct cifs_tcon *tcon, const char *path,
goto out;
}
- desired_access |= FILE_READ_ATTRIBUTES;
+ oparms->desired_access |= FILE_READ_ATTRIBUTES;
*smb2_oplock = SMB2_OPLOCK_LEVEL_BATCH;
- if (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_LEASING)
+ if (oparms->tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_LEASING)
memcpy(smb2_oplock + 1, fid->lease_key, SMB2_LEASE_KEY_SIZE);
- rc = SMB2_open(xid, tcon, smb2_path, &fid->persistent_fid,
- &fid->volatile_fid, desired_access, disposition,
- create_options, smb2_oplock, smb2_data);
+ rc = SMB2_open(xid, oparms->tcon, smb2_path, &fid->persistent_fid,
+ &fid->volatile_fid, oparms->desired_access,
+ oparms->disposition, oparms->create_options, smb2_oplock,
+ smb2_data);
if (rc)
goto out;
if (buf) {
/* open response does not have IndexNumber field - get it */
- rc = SMB2_get_srv_num(xid, tcon, fid->persistent_fid,
+ rc = SMB2_get_srv_num(xid, oparms->tcon, fid->persistent_fid,
fid->volatile_fid,
&smb2_data->IndexNumber);
if (rc) {