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

Pull smb client fixes from Steve French:

- reconnect fix

- multichannel channel selection fix

- minor mount warning fix

- reparse point fix

- null pointer check improvement

* tag '6.8-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
smb3: clarify mount warning
cifs: handle cases where multiple sessions share connection
cifs: change tcon status when need_reconnect is set on it
smb: client: set correct d_type for reparse points under DFS mounts
smb3: add missing null server pointer check

+36 -11
+11
fs/smb/client/connect.c
··· 233 233 list_for_each_entry_safe(ses, nses, &pserver->smb_ses_list, smb_ses_list) { 234 234 /* check if iface is still active */ 235 235 spin_lock(&ses->chan_lock); 236 + if (cifs_ses_get_chan_index(ses, server) == 237 + CIFS_INVAL_CHAN_INDEX) { 238 + spin_unlock(&ses->chan_lock); 239 + continue; 240 + } 241 + 236 242 if (!cifs_chan_is_iface_active(ses, server)) { 237 243 spin_unlock(&ses->chan_lock); 238 244 cifs_chan_update_iface(ses, server); ··· 4234 4228 4235 4229 /* only send once per connect */ 4236 4230 spin_lock(&tcon->tc_lock); 4231 + 4232 + /* if tcon is marked for needing reconnect, update state */ 4233 + if (tcon->need_reconnect) 4234 + tcon->status = TID_NEED_TCON; 4235 + 4237 4236 if (tcon->status == TID_GOOD) { 4238 4237 spin_unlock(&tcon->tc_lock); 4239 4238 return 0;
+6 -1
fs/smb/client/dfs.c
··· 565 565 566 566 /* only send once per connect */ 567 567 spin_lock(&tcon->tc_lock); 568 + 569 + /* if tcon is marked for needing reconnect, update state */ 570 + if (tcon->need_reconnect) 571 + tcon->status = TID_NEED_TCON; 572 + 568 573 if (tcon->status == TID_GOOD) { 569 574 spin_unlock(&tcon->tc_lock); 570 575 return 0; ··· 630 625 spin_lock(&tcon->tc_lock); 631 626 if (tcon->status == TID_IN_TCON) 632 627 tcon->status = TID_GOOD; 633 - spin_unlock(&tcon->tc_lock); 634 628 tcon->need_reconnect = false; 629 + spin_unlock(&tcon->tc_lock); 635 630 } 636 631 637 632 return rc;
+3
fs/smb/client/file.c
··· 175 175 176 176 /* only send once per connect */ 177 177 spin_lock(&tcon->tc_lock); 178 + if (tcon->need_reconnect) 179 + tcon->status = TID_NEED_RECON; 180 + 178 181 if (tcon->status != TID_NEED_RECON) { 179 182 spin_unlock(&tcon->tc_lock); 180 183 return;
+1 -1
fs/smb/client/fs_context.c
··· 211 211 212 212 switch (match_token(value, cifs_secflavor_tokens, args)) { 213 213 case Opt_sec_krb5p: 214 - cifs_errorf(fc, "sec=krb5p is not supported!\n"); 214 + cifs_errorf(fc, "sec=krb5p is not supported. Use sec=krb5,seal instead\n"); 215 215 return 1; 216 216 case Opt_sec_krb5i: 217 217 ctx->sign = true;
+8 -7
fs/smb/client/readdir.c
··· 307 307 } 308 308 309 309 static void cifs_fulldir_info_to_fattr(struct cifs_fattr *fattr, 310 - SEARCH_ID_FULL_DIR_INFO *info, 310 + const void *info, 311 311 struct cifs_sb_info *cifs_sb) 312 312 { 313 + const FILE_FULL_DIRECTORY_INFO *di = info; 314 + 313 315 __dir_info_to_fattr(fattr, info); 314 316 315 - /* See MS-FSCC 2.4.19 FileIdFullDirectoryInformation */ 317 + /* See MS-FSCC 2.4.14, 2.4.19 */ 316 318 if (fattr->cf_cifsattrs & ATTR_REPARSE) 317 - fattr->cf_cifstag = le32_to_cpu(info->EaSize); 319 + fattr->cf_cifstag = le32_to_cpu(di->EaSize); 318 320 cifs_fill_common_info(fattr, cifs_sb); 319 321 } 320 322 ··· 398 396 } else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { 399 397 cifsFile->srch_inf.info_level = SMB_FIND_FILE_ID_FULL_DIR_INFO; 400 398 } else /* not srvinos - BB fixme add check for backlevel? */ { 401 - cifsFile->srch_inf.info_level = SMB_FIND_FILE_DIRECTORY_INFO; 399 + cifsFile->srch_inf.info_level = SMB_FIND_FILE_FULL_DIRECTORY_INFO; 402 400 } 403 401 404 402 search_flags = CIFS_SEARCH_CLOSE_AT_END | CIFS_SEARCH_RETURN_RESUME; ··· 989 987 (FIND_FILE_STANDARD_INFO *)find_entry, 990 988 cifs_sb); 991 989 break; 990 + case SMB_FIND_FILE_FULL_DIRECTORY_INFO: 992 991 case SMB_FIND_FILE_ID_FULL_DIR_INFO: 993 - cifs_fulldir_info_to_fattr(&fattr, 994 - (SEARCH_ID_FULL_DIR_INFO *)find_entry, 995 - cifs_sb); 992 + cifs_fulldir_info_to_fattr(&fattr, find_entry, cifs_sb); 996 993 break; 997 994 default: 998 995 cifs_dir_info_to_fattr(&fattr,
+1 -2
fs/smb/client/sess.c
··· 76 76 unsigned int i; 77 77 78 78 /* if the channel is waiting for termination */ 79 - if (server->terminate) 79 + if (server && server->terminate) 80 80 return CIFS_INVAL_CHAN_INDEX; 81 81 82 82 for (i = 0; i < ses->chan_count; i++) { ··· 88 88 if (server) 89 89 cifs_dbg(VFS, "unable to get chan index for server: 0x%llx", 90 90 server->conn_id); 91 - WARN_ON(1); 92 91 return CIFS_INVAL_CHAN_INDEX; 93 92 } 94 93
+6
fs/smb/client/smb2pdu.c
··· 5206 5206 case SMB_FIND_FILE_POSIX_INFO: 5207 5207 req->FileInformationClass = SMB_FIND_FILE_POSIX_INFO; 5208 5208 break; 5209 + case SMB_FIND_FILE_FULL_DIRECTORY_INFO: 5210 + req->FileInformationClass = FILE_FULL_DIRECTORY_INFORMATION; 5211 + break; 5209 5212 default: 5210 5213 cifs_tcon_dbg(VFS, "info level %u isn't supported\n", 5211 5214 info_level); ··· 5277 5274 case SMB_FIND_FILE_POSIX_INFO: 5278 5275 /* note that posix payload are variable size */ 5279 5276 info_buf_size = sizeof(struct smb2_posix_info); 5277 + break; 5278 + case SMB_FIND_FILE_FULL_DIRECTORY_INFO: 5279 + info_buf_size = sizeof(FILE_FULL_DIRECTORY_INFO); 5280 5280 break; 5281 5281 default: 5282 5282 cifs_tcon_dbg(VFS, "info level %u isn't supported\n",