diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2014-01-16 15:53:36 +0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2014-01-20 09:52:13 -0600 |
commit | d81b8a40e2ece0a9ab57b1fe1798e291e75bf8fc (patch) | |
tree | a3fd90c8172375499b2ad8f5f21ba633a3e522b3 /fs/cifs/cifssmb.c | |
parent | 0360d605a236355f9501d21175e405536e2acd48 (diff) |
CIFS: Cleanup cifs open codepath
Rename CIFSSMBOpen to CIFS_open and make it take
cifs_open_parms structure as a parm.
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 8e1ebc2dc0d..4d881c35eec 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -1273,10 +1273,8 @@ OldOpenRetry: } int -CIFSSMBOpen(const unsigned int xid, struct cifs_tcon *tcon, - const char *path, const int disposition, const int desired_access, - const int create_options, __u16 *netfid, int *oplock, - FILE_ALL_INFO *buf, const struct nls_table *nls, int remap) +CIFS_open(const unsigned int xid, struct cifs_open_parms *oparms, int *oplock, + FILE_ALL_INFO *buf) { int rc = -EACCES; OPEN_REQ *req = NULL; @@ -1284,6 +1282,14 @@ CIFSSMBOpen(const unsigned int xid, struct cifs_tcon *tcon, int bytes_returned; int name_len; __u16 count; + struct cifs_sb_info *cifs_sb = oparms->cifs_sb; + struct cifs_tcon *tcon = oparms->tcon; + int remap = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR; + const struct nls_table *nls = cifs_sb->local_nls; + int create_options = oparms->create_options; + int desired_access = oparms->desired_access; + int disposition = oparms->disposition; + const char *path = oparms->path; openRetry: rc = smb_init(SMB_COM_NT_CREATE_ANDX, 24, tcon, (void **)&req, @@ -1367,7 +1373,7 @@ openRetry: /* 1 byte no need to le_to_cpu */ *oplock = rsp->OplockLevel; /* cifs fid stays in le */ - *netfid = rsp->Fid; + oparms->fid->netfid = rsp->Fid; /* Let caller know file was created so we can set the mode. */ /* Do we care about the CreateAction in any other cases? */ |