Commit dbbab325 authored by Al Viro's avatar Al Viro

cifs: get rid of unused arguments of CIFSSMBWrite()

they used to be used, but...
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent bc8bcf3b
...@@ -392,8 +392,7 @@ extern int CIFSSMBRead(const unsigned int xid, struct cifs_io_parms *io_parms, ...@@ -392,8 +392,7 @@ extern int CIFSSMBRead(const unsigned int xid, struct cifs_io_parms *io_parms,
unsigned int *nbytes, char **buf, unsigned int *nbytes, char **buf,
int *return_buf_type); int *return_buf_type);
extern int CIFSSMBWrite(const unsigned int xid, struct cifs_io_parms *io_parms, extern int CIFSSMBWrite(const unsigned int xid, struct cifs_io_parms *io_parms,
unsigned int *nbytes, const char *buf, unsigned int *nbytes, const char *buf);
const char __user *ubuf, const int long_op);
extern int CIFSSMBWrite2(const unsigned int xid, struct cifs_io_parms *io_parms, extern int CIFSSMBWrite2(const unsigned int xid, struct cifs_io_parms *io_parms,
unsigned int *nbytes, struct kvec *iov, const int nvec); unsigned int *nbytes, struct kvec *iov, const int nvec);
extern int CIFSGetSrvInodeNumber(const unsigned int xid, struct cifs_tcon *tcon, extern int CIFSGetSrvInodeNumber(const unsigned int xid, struct cifs_tcon *tcon,
......
...@@ -1228,7 +1228,6 @@ SMBLegacyOpen(const unsigned int xid, struct cifs_tcon *tcon, ...@@ -1228,7 +1228,6 @@ SMBLegacyOpen(const unsigned int xid, struct cifs_tcon *tcon,
inc_rfc1001_len(pSMB, count); inc_rfc1001_len(pSMB, count);
pSMB->ByteCount = cpu_to_le16(count); pSMB->ByteCount = cpu_to_le16(count);
/* long_op set to 1 to allow for oplock break timeouts */
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
(struct smb_hdr *)pSMBr, &bytes_returned, 0); (struct smb_hdr *)pSMBr, &bytes_returned, 0);
cifs_stats_inc(&tcon->stats.cifs_stats.num_opens); cifs_stats_inc(&tcon->stats.cifs_stats.num_opens);
...@@ -1768,8 +1767,7 @@ CIFSSMBRead(const unsigned int xid, struct cifs_io_parms *io_parms, ...@@ -1768,8 +1767,7 @@ CIFSSMBRead(const unsigned int xid, struct cifs_io_parms *io_parms,
int int
CIFSSMBWrite(const unsigned int xid, struct cifs_io_parms *io_parms, CIFSSMBWrite(const unsigned int xid, struct cifs_io_parms *io_parms,
unsigned int *nbytes, const char *buf, unsigned int *nbytes, const char *buf)
const char __user *ubuf, const int long_op)
{ {
int rc = -EACCES; int rc = -EACCES;
WRITE_REQ *pSMB = NULL; WRITE_REQ *pSMB = NULL;
...@@ -1838,12 +1836,7 @@ CIFSSMBWrite(const unsigned int xid, struct cifs_io_parms *io_parms, ...@@ -1838,12 +1836,7 @@ CIFSSMBWrite(const unsigned int xid, struct cifs_io_parms *io_parms,
cpu_to_le16(offsetof(struct smb_com_write_req, Data) - 4); cpu_to_le16(offsetof(struct smb_com_write_req, Data) - 4);
if (buf) if (buf)
memcpy(pSMB->Data, buf, bytes_sent); memcpy(pSMB->Data, buf, bytes_sent);
else if (ubuf) { else if (count != 0) {
if (copy_from_user(pSMB->Data, ubuf, bytes_sent)) {
cifs_buf_release(pSMB);
return -EFAULT;
}
} else if (count != 0) {
/* No buffer */ /* No buffer */
cifs_buf_release(pSMB); cifs_buf_release(pSMB);
return -EINVAL; return -EINVAL;
...@@ -1867,7 +1860,7 @@ CIFSSMBWrite(const unsigned int xid, struct cifs_io_parms *io_parms, ...@@ -1867,7 +1860,7 @@ CIFSSMBWrite(const unsigned int xid, struct cifs_io_parms *io_parms,
} }
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
(struct smb_hdr *) pSMBr, &bytes_returned, long_op); (struct smb_hdr *) pSMBr, &bytes_returned, 0);
cifs_stats_inc(&tcon->stats.cifs_stats.num_writes); cifs_stats_inc(&tcon->stats.cifs_stats.num_writes);
if (rc) { if (rc) {
cifs_dbg(FYI, "Send error in write = %d\n", rc); cifs_dbg(FYI, "Send error in write = %d\n", rc);
......
...@@ -399,7 +399,7 @@ cifs_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, ...@@ -399,7 +399,7 @@ cifs_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
io_parms.offset = 0; io_parms.offset = 0;
io_parms.length = CIFS_MF_SYMLINK_FILE_SIZE; io_parms.length = CIFS_MF_SYMLINK_FILE_SIZE;
rc = CIFSSMBWrite(xid, &io_parms, pbytes_written, pbuf, NULL, 0); rc = CIFSSMBWrite(xid, &io_parms, pbytes_written, pbuf);
CIFSSMBClose(xid, tcon, fid.netfid); CIFSSMBClose(xid, tcon, fid.netfid);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment