Commit 8a5ebd2b authored by Shyam Prasad N's avatar Shyam Prasad N Committed by Steve French
Browse files

cifs: update the lock ordering comments with new mutex



The lock ordering rules listed as comments in cifsglob.h were
missing some lock details and also the fid_lock.

Updated those notes in this commit.

Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent b4f60a05
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -1992,7 +1992,6 @@ require use of the stronger protocol */
 * reconnect_mutex
 * TCP_Server_Info->srv_mutex	TCP_Server_Info			cifs_get_tcp_session
 * cifs_ses->session_mutex	cifs_ses			sesInfoAlloc
 *				cifs_tcon
 * cifs_tcon->open_file_lock	cifs_tcon->openFileList		tconInfoAlloc
 *				cifs_tcon->pending_opens
 * cifs_tcon->stat_lock		cifs_tcon->bytes_read		tconInfoAlloc
@@ -2011,13 +2010,15 @@ require use of the stronger protocol */
 *				->oplock_credits
 *				->reconnect_instance
 * cifs_ses->ses_lock		(anything that is not protected by another lock and can change)
 *								sesInfoAlloc
 * cifs_ses->iface_lock		cifs_ses->iface_list		sesInfoAlloc
 *				->iface_count
 *				->iface_last_update
 * cifs_ses->chan_lock		cifs_ses->chans
 * cifs_ses->chan_lock		cifs_ses->chans			sesInfoAlloc
 *				->chans_need_reconnect
 *				->chans_in_reconnect
 * cifs_tcon->tc_lock		(anything that is not protected by another lock and can change)
 *								tcon_info_alloc
 * inode->i_rwsem, taken by fs/netfs/locking.c e.g. should be taken before cifsInodeInfo locks
 * cifsInodeInfo->open_file_lock	cifsInodeInfo->openFileList	cifs_alloc_inode
 * cifsInodeInfo->writers_lock	cifsInodeInfo->writers		cifsInodeInfo_alloc
@@ -2025,6 +2026,8 @@ require use of the stronger protocol */
 *				->can_cache_brlcks
 * cifsInodeInfo->deferred_lock	cifsInodeInfo->deferred_closes	cifsInodeInfo_alloc
 * cached_fids->cfid_list_lock	cifs_tcon->cfids->entries	init_cached_dirs
 * cached_fid->fid_lock		(anything that is not protected by another lock and can change)
 *								init_cached_dir
 * cifsFileInfo->fh_mutex	cifsFileInfo			cifs_new_fileinfo
 * cifsFileInfo->file_info_lock	cifsFileInfo->count		cifs_new_fileinfo
 *				->invalidHandle			initiate_cifs_search