@@ -347,7 +347,7 @@ struct smb_version_operations {
347347 /* connect to a server share */
348348 int (* tree_connect )(const unsigned int , struct cifs_ses * , const char * ,
349349 struct cifs_tcon * , const struct nls_table * );
350- /* close tree connecion */
350+ /* close tree connection */
351351 int (* tree_disconnect )(const unsigned int , struct cifs_tcon * );
352352 /* get DFS referrals */
353353 int (* get_dfs_refer )(const unsigned int , struct cifs_ses * ,
@@ -443,10 +443,10 @@ struct smb_version_operations {
443443 /* set fid protocol-specific info */
444444 void (* set_fid )(struct cifsFileInfo * , struct cifs_fid * , __u32 );
445445 /* close a file */
446- void (* close )(const unsigned int , struct cifs_tcon * ,
446+ int (* close )(const unsigned int , struct cifs_tcon * ,
447447 struct cifs_fid * );
448448 /* close a file, returning file attributes and timestamps */
449- void (* close_getattr )(const unsigned int xid , struct cifs_tcon * tcon ,
449+ int (* close_getattr )(const unsigned int xid , struct cifs_tcon * tcon ,
450450 struct cifsFileInfo * pfile_info );
451451 /* send a flush request to the server */
452452 int (* flush )(const unsigned int , struct cifs_tcon * , struct cifs_fid * );
@@ -819,7 +819,7 @@ struct TCP_Server_Info {
819819 * Protected by @refpath_lock and @srv_lock. The @refpath_lock is
820820 * mostly used for not requiring a copy of @leaf_fullpath when getting
821821 * cached or new DFS referrals (which might also sleep during I/O).
822- * While @srv_lock is held for making string and NULL comparions against
822+ * While @srv_lock is held for making string and NULL comparisons against
823823 * both fields as in mount(2) and cache refresh.
824824 *
825825 * format: \\HOST\SHARE[\OPTIONAL PATH]
@@ -1078,6 +1078,7 @@ struct cifs_ses {
10781078 and after mount option parsing we fill it */
10791079 char * domainName ;
10801080 char * password ;
1081+ char * password2 ; /* When key rotation used, new password may be set before it expires */
10811082 char workstation_name [CIFS_MAX_WORKSTATION_LEN ];
10821083 struct session_key auth_key ;
10831084 struct ntlmssp_auth * ntlmssp ; /* ciphertext, flags, server challenge */
@@ -1190,6 +1191,7 @@ struct cifs_fattr {
11901191 */
11911192struct cifs_tcon {
11921193 struct list_head tcon_list ;
1194+ int debug_id ; /* Debugging for tracing */
11931195 int tc_count ;
11941196 struct list_head rlist ; /* reconnect list */
11951197 spinlock_t tc_lock ; /* protect anything here that is not protected */
@@ -1276,7 +1278,9 @@ struct cifs_tcon {
12761278 __u32 max_cached_dirs ;
12771279#ifdef CONFIG_CIFS_FSCACHE
12781280 u64 resource_id ; /* server resource id */
1281+ bool fscache_acquired ; /* T if we've tried acquiring a cookie */
12791282 struct fscache_volume * fscache ; /* cookie for share */
1283+ struct mutex fscache_lock ; /* Prevent regetting a cookie */
12801284#endif
12811285 struct list_head pending_opens ; /* list of incomplete opens */
12821286 struct cached_fids * cfids ;
@@ -1440,6 +1444,7 @@ struct cifsFileInfo {
14401444 bool swapfile :1 ;
14411445 bool oplock_break_cancelled :1 ;
14421446 bool status_file_deleted :1 ; /* file has been deleted */
1447+ bool offload :1 ; /* offload final part of _put to a wq */
14431448 unsigned int oplock_epoch ; /* epoch from the lease break */
14441449 __u32 oplock_level ; /* oplock/lease level from the lease break */
14451450 int count ;
@@ -1448,6 +1453,7 @@ struct cifsFileInfo {
14481453 struct cifs_search_info srch_inf ;
14491454 struct work_struct oplock_break ; /* work for oplock breaks */
14501455 struct work_struct put ; /* work for the final part of _put */
1456+ struct work_struct serverclose ; /* work for serverclose */
14511457 struct delayed_work deferred ;
14521458 bool deferred_close_scheduled ; /* Flag to indicate close is scheduled */
14531459 char * symlink_target ;
@@ -1929,7 +1935,7 @@ static inline bool is_replayable_error(int error)
19291935#define CIFSSEC_MAY_SIGN 0x00001
19301936#define CIFSSEC_MAY_NTLMV2 0x00004
19311937#define CIFSSEC_MAY_KRB5 0x00008
1932- #define CIFSSEC_MAY_SEAL 0x00040 /* not supported yet */
1938+ #define CIFSSEC_MAY_SEAL 0x00040
19331939#define CIFSSEC_MAY_NTLMSSP 0x00080 /* raw ntlmssp with ntlmv2 */
19341940
19351941#define CIFSSEC_MUST_SIGN 0x01001
@@ -1939,15 +1945,15 @@ require use of the stronger protocol */
19391945#define CIFSSEC_MUST_NTLMV2 0x04004
19401946#define CIFSSEC_MUST_KRB5 0x08008
19411947#ifdef CONFIG_CIFS_UPCALL
1942- #define CIFSSEC_MASK 0x8F08F /* flags supported if no weak allowed */
1948+ #define CIFSSEC_MASK 0xCF0CF /* flags supported if no weak allowed */
19431949#else
1944- #define CIFSSEC_MASK 0x87087 /* flags supported if no weak allowed */
1950+ #define CIFSSEC_MASK 0xC70C7 /* flags supported if no weak allowed */
19451951#endif /* UPCALL */
1946- #define CIFSSEC_MUST_SEAL 0x40040 /* not supported yet */
1952+ #define CIFSSEC_MUST_SEAL 0x40040
19471953#define CIFSSEC_MUST_NTLMSSP 0x80080 /* raw ntlmssp with ntlmv2 */
19481954
1949- #define CIFSSEC_DEF (CIFSSEC_MAY_SIGN | CIFSSEC_MAY_NTLMV2 | CIFSSEC_MAY_NTLMSSP)
1950- #define CIFSSEC_MAX (CIFSSEC_MUST_NTLMV2 )
1955+ #define CIFSSEC_DEF (CIFSSEC_MAY_SIGN | CIFSSEC_MAY_NTLMV2 | CIFSSEC_MAY_NTLMSSP | CIFSSEC_MAY_SEAL )
1956+ #define CIFSSEC_MAX (CIFSSEC_MAY_SIGN | CIFSSEC_MUST_KRB5 | CIFSSEC_MAY_SEAL )
19511957#define CIFSSEC_AUTH_MASK (CIFSSEC_MAY_NTLMV2 | CIFSSEC_MAY_KRB5 | CIFSSEC_MAY_NTLMSSP)
19521958/*
19531959 *****************************************************************
@@ -2065,9 +2071,9 @@ extern spinlock_t cifs_tcp_ses_lock;
20652071/*
20662072 * Global transaction id (XID) information
20672073 */
2068- extern unsigned int GlobalCurrentXid ; /* protected by GlobalMid_Sem */
2069- extern unsigned int GlobalTotalActiveXid ; /* prot by GlobalMid_Sem */
2070- extern unsigned int GlobalMaxActiveXid ; /* prot by GlobalMid_Sem */
2074+ extern unsigned int GlobalCurrentXid ; /* protected by GlobalMid_Lock */
2075+ extern unsigned int GlobalTotalActiveXid ; /* prot by GlobalMid_Lock */
2076+ extern unsigned int GlobalMaxActiveXid ; /* prot by GlobalMid_Lock */
20712077extern spinlock_t GlobalMid_Lock ; /* protects above & list operations on midQ entries */
20722078
20732079/*
@@ -2117,6 +2123,7 @@ extern struct workqueue_struct *decrypt_wq;
21172123extern struct workqueue_struct * fileinfo_put_wq ;
21182124extern struct workqueue_struct * cifsoplockd_wq ;
21192125extern struct workqueue_struct * deferredclose_wq ;
2126+ extern struct workqueue_struct * serverclose_wq ;
21202127extern __u32 cifs_lock_secret ;
21212128
21222129extern mempool_t * cifs_sm_req_poolp ;
0 commit comments