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: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by Shyam Prasad N and committed by Steve French 8a5ebd2b b4f60a05

+8 -5
+8 -5
fs/smb/client/cifsglob.h
··· 1991 * TCP_Server_Info-> TCP_Server_Info cifs_get_tcp_session 1992 * reconnect_mutex 1993 * TCP_Server_Info->srv_mutex TCP_Server_Info cifs_get_tcp_session 1994 - * cifs_ses->session_mutex cifs_ses sesInfoAlloc 1995 - * cifs_tcon 1996 * cifs_tcon->open_file_lock cifs_tcon->openFileList tconInfoAlloc 1997 * cifs_tcon->pending_opens 1998 * cifs_tcon->stat_lock cifs_tcon->bytes_read tconInfoAlloc ··· 2010 * ->oplock_credits 2011 * ->reconnect_instance 2012 * cifs_ses->ses_lock (anything that is not protected by another lock and can change) 2013 * cifs_ses->iface_lock cifs_ses->iface_list sesInfoAlloc 2014 * ->iface_count 2015 * ->iface_last_update 2016 - * cifs_ses->chan_lock cifs_ses->chans 2017 * ->chans_need_reconnect 2018 * ->chans_in_reconnect 2019 * cifs_tcon->tc_lock (anything that is not protected by another lock and can change) 2020 * inode->i_rwsem, taken by fs/netfs/locking.c e.g. should be taken before cifsInodeInfo locks 2021 * cifsInodeInfo->open_file_lock cifsInodeInfo->openFileList cifs_alloc_inode 2022 * cifsInodeInfo->writers_lock cifsInodeInfo->writers cifsInodeInfo_alloc 2023 * cifsInodeInfo->lock_sem cifsInodeInfo->llist cifs_init_once 2024 * ->can_cache_brlcks 2025 * cifsInodeInfo->deferred_lock cifsInodeInfo->deferred_closes cifsInodeInfo_alloc 2026 - * cached_fids->cfid_list_lock cifs_tcon->cfids->entries init_cached_dirs 2027 - * cifsFileInfo->fh_mutex cifsFileInfo cifs_new_fileinfo 2028 * cifsFileInfo->file_info_lock cifsFileInfo->count cifs_new_fileinfo 2029 * ->invalidHandle initiate_cifs_search 2030 * ->oplock_break_cancelled
··· 1991 * TCP_Server_Info-> TCP_Server_Info cifs_get_tcp_session 1992 * reconnect_mutex 1993 * TCP_Server_Info->srv_mutex TCP_Server_Info cifs_get_tcp_session 1994 + * cifs_ses->session_mutex cifs_ses sesInfoAlloc 1995 * cifs_tcon->open_file_lock cifs_tcon->openFileList tconInfoAlloc 1996 * cifs_tcon->pending_opens 1997 * cifs_tcon->stat_lock cifs_tcon->bytes_read tconInfoAlloc ··· 2011 * ->oplock_credits 2012 * ->reconnect_instance 2013 * cifs_ses->ses_lock (anything that is not protected by another lock and can change) 2014 + * sesInfoAlloc 2015 * cifs_ses->iface_lock cifs_ses->iface_list sesInfoAlloc 2016 * ->iface_count 2017 * ->iface_last_update 2018 + * cifs_ses->chan_lock cifs_ses->chans sesInfoAlloc 2019 * ->chans_need_reconnect 2020 * ->chans_in_reconnect 2021 * cifs_tcon->tc_lock (anything that is not protected by another lock and can change) 2022 + * tcon_info_alloc 2023 * inode->i_rwsem, taken by fs/netfs/locking.c e.g. should be taken before cifsInodeInfo locks 2024 * cifsInodeInfo->open_file_lock cifsInodeInfo->openFileList cifs_alloc_inode 2025 * cifsInodeInfo->writers_lock cifsInodeInfo->writers cifsInodeInfo_alloc 2026 * cifsInodeInfo->lock_sem cifsInodeInfo->llist cifs_init_once 2027 * ->can_cache_brlcks 2028 * cifsInodeInfo->deferred_lock cifsInodeInfo->deferred_closes cifsInodeInfo_alloc 2029 + * cached_fids->cfid_list_lock cifs_tcon->cfids->entries init_cached_dirs 2030 + * cached_fid->fid_lock (anything that is not protected by another lock and can change) 2031 + * init_cached_dir 2032 + * cifsFileInfo->fh_mutex cifsFileInfo cifs_new_fileinfo 2033 * cifsFileInfo->file_info_lock cifsFileInfo->count cifs_new_fileinfo 2034 * ->invalidHandle initiate_cifs_search 2035 * ->oplock_break_cancelled