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 '6.6-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:
"Three small SMB3 client fixes, one to improve a null check and two
minor cleanups"

* tag '6.6-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
smb3: fix some minor typos and repeated words
smb3: correct places where ENOTSUPP is used instead of preferred EOPNOTSUPP
smb3: move server check earlier when setting channel sequence number

+24 -17
+1 -1
fs/smb/client/inode.c
··· 2680 2680 } 2681 2681 2682 2682 cifsFileInfo_put(cfile); 2683 - return -ENOTSUPP; 2683 + return -EOPNOTSUPP; 2684 2684 } 2685 2685 2686 2686 int cifs_truncate_page(struct address_space *mapping, loff_t from)
+3 -3
fs/smb/client/smb2ops.c
··· 297 297 cifs_server_dbg(VFS, "request has less credits (%d) than required (%d)", 298 298 credits->value, new_val); 299 299 300 - return -ENOTSUPP; 300 + return -EOPNOTSUPP; 301 301 } 302 302 303 303 spin_lock(&server->req_lock); ··· 1161 1161 /* Use a fudge factor of 256 bytes in case we collide 1162 1162 * with a different set_EAs command. 1163 1163 */ 1164 - if(CIFSMaxBufSize - MAX_SMB2_CREATE_RESPONSE_SIZE - 1164 + if (CIFSMaxBufSize - MAX_SMB2_CREATE_RESPONSE_SIZE - 1165 1165 MAX_SMB2_CLOSE_RESPONSE_SIZE - 256 < 1166 1166 used_len + ea_name_len + ea_value_len + 1) { 1167 1167 rc = -ENOSPC; ··· 4591 4591 4592 4592 if (shdr->Command != SMB2_READ) { 4593 4593 cifs_server_dbg(VFS, "only big read responses are supported\n"); 4594 - return -ENOTSUPP; 4594 + return -EOPNOTSUPP; 4595 4595 } 4596 4596 4597 4597 if (server->ops->is_session_expired &&
+19 -12
fs/smb/client/smb2pdu.c
··· 89 89 struct TCP_Server_Info *server) 90 90 { 91 91 struct smb3_hdr_req *smb3_hdr; 92 + 92 93 shdr->ProtocolId = SMB2_PROTO_NUMBER; 93 94 shdr->StructureSize = cpu_to_le16(64); 94 95 shdr->Command = smb2_cmd; 95 - if (server->dialect >= SMB30_PROT_ID) { 96 - /* After reconnect SMB3 must set ChannelSequence on subsequent reqs */ 97 - smb3_hdr = (struct smb3_hdr_req *)shdr; 98 - /* if primary channel is not set yet, use default channel for chan sequence num */ 99 - if (SERVER_IS_CHAN(server)) 100 - smb3_hdr->ChannelSequence = 101 - cpu_to_le16(server->primary_server->channel_sequence_num); 102 - else 103 - smb3_hdr->ChannelSequence = cpu_to_le16(server->channel_sequence_num); 104 - } 96 + 105 97 if (server) { 98 + /* After reconnect SMB3 must set ChannelSequence on subsequent reqs */ 99 + if (server->dialect >= SMB30_PROT_ID) { 100 + smb3_hdr = (struct smb3_hdr_req *)shdr; 101 + /* 102 + * if primary channel is not set yet, use default 103 + * channel for chan sequence num 104 + */ 105 + if (SERVER_IS_CHAN(server)) 106 + smb3_hdr->ChannelSequence = 107 + cpu_to_le16(server->primary_server->channel_sequence_num); 108 + else 109 + smb3_hdr->ChannelSequence = 110 + cpu_to_le16(server->channel_sequence_num); 111 + } 106 112 spin_lock(&server->req_lock); 107 113 /* Request up to 10 credits but don't go over the limit. */ 108 114 if (server->credits >= server->max_credits) ··· 2240 2234 * (most servers default to 120 seconds) and most clients default to 0. 2241 2235 * This can be overridden at mount ("handletimeout=") if the user wants 2242 2236 * a different persistent (or resilient) handle timeout for all opens 2243 - * opens on a particular SMB3 mount. 2237 + * on a particular SMB3 mount. 2244 2238 */ 2245 2239 buf->dcontext.Timeout = cpu_to_le32(oparms->tcon->handle_timeout); 2246 2240 buf->dcontext.Flags = cpu_to_le32(SMB2_DHANDLE_FLAG_PERSISTENT); ··· 2385 2379 return 0; 2386 2380 } 2387 2381 2388 - /* See See http://technet.microsoft.com/en-us/library/hh509017(v=ws.10).aspx */ 2382 + /* See http://technet.microsoft.com/en-us/library/hh509017(v=ws.10).aspx */ 2389 2383 static void setup_owner_group_sids(char *buf) 2390 2384 { 2391 2385 struct owner_group_sids *sids = (struct owner_group_sids *)buf; ··· 3130 3124 SMB2_ioctl_free(struct smb_rqst *rqst) 3131 3125 { 3132 3126 int i; 3127 + 3133 3128 if (rqst && rqst->rq_iov) { 3134 3129 cifs_small_buf_release(rqst->rq_iov[0].iov_base); /* request */ 3135 3130 for (i = 1; i < rqst->rq_nvec; i++)
+1 -1
fs/smb/client/transport.c
··· 18 18 #include <linux/bvec.h> 19 19 #include <linux/highmem.h> 20 20 #include <linux/uaccess.h> 21 - #include <asm/processor.h> 21 + #include <linux/processor.h> 22 22 #include <linux/mempool.h> 23 23 #include <linux/sched/signal.h> 24 24 #include <linux/task_io_accounting_ops.h>