Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'v7.1-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

- multichannel crediting fix

- memory allocation improvement for smb2_compound_op

- remove some dead code

* tag 'v7.1-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: change_conf needs to be called for session setup
smb: client: change allocation requirements in smb2_compound_op
smb/client: remove unused smb3_parse_opt()

+12 -33
-1
fs/smb/client/cifsproto.h
··· 89 89 struct mid_q_entry *mid); 90 90 char *smb3_fs_context_fullpath(const struct smb3_fs_context *ctx, char dirsep); 91 91 int smb3_parse_devname(const char *devname, struct smb3_fs_context *ctx); 92 - int smb3_parse_opt(const char *options, const char *key, char **val); 93 92 int cifs_ipaddr_cmp(struct sockaddr *srcaddr, struct sockaddr *rhs); 94 93 bool cifs_match_ipaddr(struct sockaddr *srcaddr, struct sockaddr *rhs); 95 94 int cifs_discard_remaining_data(struct TCP_Server_Info *server);
-31
fs/smb/client/fs_context.c
··· 536 536 return 0; 537 537 } 538 538 539 - int smb3_parse_opt(const char *options, const char *key, char **val) 540 - { 541 - int rc = -ENOENT; 542 - char *opts, *orig, *p; 543 - 544 - orig = opts = kstrdup(options, GFP_KERNEL); 545 - if (!opts) 546 - return -ENOMEM; 547 - 548 - while ((p = strsep(&opts, ","))) { 549 - char *nval; 550 - 551 - if (!*p) 552 - continue; 553 - if (strncasecmp(p, key, strlen(key))) 554 - continue; 555 - nval = strchr(p, '='); 556 - if (nval) { 557 - if (nval == p) 558 - continue; 559 - *nval++ = 0; 560 - *val = kstrdup(nval, GFP_KERNEL); 561 - rc = !*val ? -ENOMEM : 0; 562 - goto out; 563 - } 564 - } 565 - out: 566 - kfree(orig); 567 - return rc; 568 - } 569 - 570 539 /* 571 540 * Remove duplicate path delimiters. Windows is supposed to do that 572 541 * but there are some bugs that prevent rename from working if there are
+1 -1
fs/smb/client/smb2inode.c
··· 230 230 num_rqst = 0; 231 231 server = cifs_pick_channel(ses); 232 232 233 - vars = kzalloc_obj(*vars, GFP_ATOMIC); 233 + vars = kzalloc_obj(*vars, GFP_KERNEL); 234 234 if (vars == NULL) { 235 235 rc = -ENOMEM; 236 236 goto out;
+11
fs/smb/client/smb2ops.c
··· 111 111 cifs_trace_rw_credits_zero_in_flight); 112 112 } 113 113 server->in_flight--; 114 + 115 + /* 116 + * Rebalance credits when an op drains in_flight. For session setup, 117 + * do this only when the total accumulated credits are high enough (>2) 118 + * so that a newly established secondary channel can reserve credits for 119 + * echoes and oplocks. We expect this to happen at the end of the final 120 + * session setup response. 121 + */ 114 122 if (server->in_flight == 0 && 115 123 ((optype & CIFS_OP_MASK) != CIFS_NEG_OP) && 116 124 ((optype & CIFS_OP_MASK) != CIFS_SESS_OP)) 125 + rc = change_conf(server); 126 + else if (server->in_flight == 0 && 127 + ((optype & CIFS_OP_MASK) == CIFS_SESS_OP) && *val > 2) 117 128 rc = change_conf(server); 118 129 /* 119 130 * Sometimes server returns 0 credits on oplock break ack - we need to