forked from Minki/linux
cifs: remove unused server parameter from calc_smb_size()
This parameter is unused by the called function Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
5dd8ce2466
commit
68ed14496b
@ -42,7 +42,7 @@ void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
|
||||
smb->Command, smb->Status.CifsError,
|
||||
smb->Flags, smb->Flags2, smb->Mid, smb->Pid);
|
||||
cifs_dbg(VFS, "smb buf %p len %u\n", smb,
|
||||
server->ops->calc_smb_size(smb, server));
|
||||
server->ops->calc_smb_size(smb));
|
||||
#endif /* CONFIG_CIFS_DEBUG2 */
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,7 @@ struct smb_version_operations {
|
||||
int (*close_dir)(const unsigned int, struct cifs_tcon *,
|
||||
struct cifs_fid *);
|
||||
/* calculate a size of SMB message */
|
||||
unsigned int (*calc_smb_size)(void *buf, struct TCP_Server_Info *ptcpi);
|
||||
unsigned int (*calc_smb_size)(void *buf);
|
||||
/* check for STATUS_PENDING and process the response if yes */
|
||||
bool (*is_status_pending)(char *buf, struct TCP_Server_Info *server);
|
||||
/* check for STATUS_NETWORK_SESSION_EXPIRED */
|
||||
|
@ -151,7 +151,7 @@ extern int cifs_get_writable_path(struct cifs_tcon *tcon, const char *name,
|
||||
extern struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *, bool);
|
||||
extern int cifs_get_readable_path(struct cifs_tcon *tcon, const char *name,
|
||||
struct cifsFileInfo **ret_file);
|
||||
extern unsigned int smbCalcSize(void *buf, struct TCP_Server_Info *server);
|
||||
extern unsigned int smbCalcSize(void *buf);
|
||||
extern int decode_negTokenInit(unsigned char *security_blob, int length,
|
||||
struct TCP_Server_Info *server);
|
||||
extern int cifs_convert_address(struct sockaddr *dst, const char *src, int len);
|
||||
|
@ -354,7 +354,7 @@ checkSMB(char *buf, unsigned int total_read, struct TCP_Server_Info *server)
|
||||
/* otherwise, there is enough to get to the BCC */
|
||||
if (check_smb_hdr(smb))
|
||||
return -EIO;
|
||||
clc_len = smbCalcSize(smb, server);
|
||||
clc_len = smbCalcSize(smb);
|
||||
|
||||
if (4 + rfclen != total_read) {
|
||||
cifs_dbg(VFS, "Length read does not match RFC1001 length %d\n",
|
||||
|
@ -909,7 +909,7 @@ map_and_check_smb_error(struct mid_q_entry *mid, bool logErr)
|
||||
* portion, the number of word parameters and the data portion of the message
|
||||
*/
|
||||
unsigned int
|
||||
smbCalcSize(void *buf, struct TCP_Server_Info *server)
|
||||
smbCalcSize(void *buf)
|
||||
{
|
||||
struct smb_hdr *ptr = buf;
|
||||
return (sizeof(struct smb_hdr) + (2 * ptr->WordCount) +
|
||||
|
@ -806,8 +806,7 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
|
||||
|
||||
end_of_smb = cfile->srch_inf.ntwrk_buf_start +
|
||||
server->ops->calc_smb_size(
|
||||
cfile->srch_inf.ntwrk_buf_start,
|
||||
server);
|
||||
cfile->srch_inf.ntwrk_buf_start);
|
||||
|
||||
cur_ent = cfile->srch_inf.srch_entries_start;
|
||||
first_entry_in_buffer = cfile->srch_inf.index_of_last_entry
|
||||
@ -1161,8 +1160,7 @@ int cifs_readdir(struct file *file, struct dir_context *ctx)
|
||||
cifs_dbg(FYI, "loop through %d times filling dir for net buf %p\n",
|
||||
num_to_fill, cifsFile->srch_inf.ntwrk_buf_start);
|
||||
max_len = tcon->ses->server->ops->calc_smb_size(
|
||||
cifsFile->srch_inf.ntwrk_buf_start,
|
||||
tcon->ses->server);
|
||||
cifsFile->srch_inf.ntwrk_buf_start);
|
||||
end_of_smb = cifsFile->srch_inf.ntwrk_buf_start + max_len;
|
||||
|
||||
tmp_buf = kmalloc(UNICODE_NAME_MAX, GFP_KERNEL);
|
||||
|
@ -222,7 +222,7 @@ smb2_check_message(char *buf, unsigned int len, struct TCP_Server_Info *server)
|
||||
}
|
||||
}
|
||||
|
||||
calc_len = smb2_calc_size(buf, server);
|
||||
calc_len = smb2_calc_size(buf);
|
||||
|
||||
/* For SMB2_IOCTL, OutputOffset and OutputLength are optional, so might
|
||||
* be 0, and not a real miscalculation */
|
||||
@ -410,7 +410,7 @@ smb2_get_data_area_len(int *off, int *len, struct smb2_hdr *shdr)
|
||||
* portion, the number of word parameters and the data portion of the message.
|
||||
*/
|
||||
unsigned int
|
||||
smb2_calc_size(void *buf, struct TCP_Server_Info *srvr)
|
||||
smb2_calc_size(void *buf)
|
||||
{
|
||||
struct smb2_pdu *pdu = buf;
|
||||
struct smb2_hdr *shdr = &pdu->hdr;
|
||||
|
@ -387,7 +387,7 @@ smb2_dump_detail(void *buf, struct TCP_Server_Info *server)
|
||||
shdr->Command, shdr->Status, shdr->Flags, shdr->MessageId,
|
||||
shdr->Id.SyncId.ProcessId);
|
||||
cifs_server_dbg(VFS, "smb buf %p len %u\n", buf,
|
||||
server->ops->calc_smb_size(buf, server));
|
||||
server->ops->calc_smb_size(buf));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ struct smb_rqst;
|
||||
extern int map_smb2_to_linux_error(char *buf, bool log_err);
|
||||
extern int smb2_check_message(char *buf, unsigned int length,
|
||||
struct TCP_Server_Info *server);
|
||||
extern unsigned int smb2_calc_size(void *buf, struct TCP_Server_Info *server);
|
||||
extern unsigned int smb2_calc_size(void *buf);
|
||||
extern char *smb2_get_data_area_len(int *off, int *len,
|
||||
struct smb2_hdr *shdr);
|
||||
extern __le16 *cifs_convert_path_to_utf16(const char *from,
|
||||
|
Loading…
Reference in New Issue
Block a user