cifs: update calc_size to take a server argument
and change the smb2 version to take heder_preamble_size into account instead of hardcoding it as 4 bytes. Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Steve French

vecāks
14547f7d74
revīzija
9ec672bd17
@@ -650,7 +650,8 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
|
||||
char *cur_ent;
|
||||
char *end_of_smb = cfile->srch_inf.ntwrk_buf_start +
|
||||
server->ops->calc_smb_size(
|
||||
cfile->srch_inf.ntwrk_buf_start);
|
||||
cfile->srch_inf.ntwrk_buf_start,
|
||||
server);
|
||||
|
||||
cur_ent = cfile->srch_inf.srch_entries_start;
|
||||
first_entry_in_buffer = cfile->srch_inf.index_of_last_entry
|
||||
@@ -831,7 +832,8 @@ 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);
|
||||
cifsFile->srch_inf.ntwrk_buf_start,
|
||||
tcon->ses->server);
|
||||
end_of_smb = cifsFile->srch_inf.ntwrk_buf_start + max_len;
|
||||
|
||||
tmp_buf = kmalloc(UNICODE_NAME_MAX, GFP_KERNEL);
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user