* [PATCH] cifs: correct comments explaining internal semaphore usage in the module
@ 2021-04-09 19:51 Steve French
2021-04-12 16:16 ` Aurélien Aptel
0 siblings, 1 reply; 2+ messages in thread
From: Steve French @ 2021-04-09 19:51 UTC (permalink / raw)
To: CIFS
A few of the semaphores had been removed, and one additional one
needed to be noted in the comments. (Additional updates to the
semaphore/mutex/lock descriptions in the comments in cifsglob.h
could be helpful to make sure they accurately reflect what protects
what).
Signed-off-by: Steve French <stfrench@microsoft.com>
---
fs/cifs/cifsglob.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index f84a839224ae..6cc54a1d4336 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -1792,9 +1792,8 @@ require use of the stronger protocol */
*
* Semaphores
* ----------
- * sesSem operations on smb session
- * tconSem operations on tree connection
- * fh_sem file handle reconnection operations
+ * cifsInodeInfo->lock_sem protects:
+ * the list of locks held by the inode
*
****************************************************************************/
--
Thanks,
Steve
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cifs: correct comments explaining internal semaphore usage in the module
2021-04-09 19:51 [PATCH] cifs: correct comments explaining internal semaphore usage in the module Steve French
@ 2021-04-12 16:16 ` Aurélien Aptel
0 siblings, 0 replies; 2+ messages in thread
From: Aurélien Aptel @ 2021-04-12 16:16 UTC (permalink / raw)
To: Steve French, CIFS
Steve French <smfrench@gmail.com> writes:
> A few of the semaphores had been removed, and one additional one
> needed to be noted in the comments. (Additional updates to the
> semaphore/mutex/lock descriptions in the comments in cifsglob.h
> could be helpful to make sure they accurately reflect what protects
> what).
That's a very good idea. A good starting point would be:
$ grep 'struct[\t ]*mutex\|spinlock_t\|rw_semaphore\|seqlock_t\|rcu_.*lock' fs/cifs/*[ch]
fs/cifs/cifs_fs_sb.h: spinlock_t tlink_tree_lock;
fs/cifs/cifsglob.h: spinlock_t req_lock; /* protect the two values above */
fs/cifs/cifsglob.h: struct mutex srv_mutex;
fs/cifs/cifsglob.h: struct mutex reconnect_mutex; /* prevent simultaneous reconnects */
fs/cifs/cifsglob.h: struct mutex session_mutex;
fs/cifs/cifsglob.h: spinlock_t iface_lock;
fs/cifs/cifsglob.h: struct mutex fid_mutex;
fs/cifs/cifsglob.h: spinlock_t open_file_lock; /* protects list above */
fs/cifs/cifsglob.h: spinlock_t stat_lock; /* protects the two fields above */
fs/cifs/cifsglob.h: spinlock_t file_info_lock; /* protects four flag/count fields above */
fs/cifs/cifsglob.h: struct mutex fh_mutex; /* prevents reopen race after dead ses*/
fs/cifs/cifsglob.h: struct mutex aio_mutex;
fs/cifs/cifsglob.h: struct rw_semaphore lock_sem; /* protect the fields above */
fs/cifs/cifsglob.h: spinlock_t open_file_lock; /* protects openFileList */
fs/cifs/cifsglob.h: spinlock_t writers_lock;
fs/cifs/cifsglob.h:GLOBAL_EXTERN spinlock_t cifs_tcp_ses_lock;
fs/cifs/cifsglob.h:GLOBAL_EXTERN spinlock_t GlobalMid_Lock; /* protects above & list operations */
fs/cifs/cifsproto.h:extern void cifs_down_write(struct rw_semaphore *sem);
fs/cifs/dfs_cache.c: spinlock_t ctx_lock;
fs/cifs/dir.c: rcu_read_lock();
fs/cifs/dir.c: rcu_read_unlock();
fs/cifs/dir.c: rcu_read_unlock();
fs/cifs/dir.c: rcu_read_lock();
fs/cifs/dir.c: rcu_read_unlock();
fs/cifs/dir.c: rcu_read_unlock();
fs/cifs/file.c:cifs_down_write(struct rw_semaphore *sem)
fs/cifs/smbdirect.h: spinlock_t lock_new_credits_offered;
fs/cifs/smbdirect.h: spinlock_t mr_list_lock;
fs/cifs/smbdirect.h: spinlock_t receive_queue_lock;
fs/cifs/smbdirect.h: spinlock_t empty_packet_queue_lock;
fs/cifs/smbdirect.h: spinlock_t reassembly_queue_lock;
Cheers,
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-12 16:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 19:51 [PATCH] cifs: correct comments explaining internal semaphore usage in the module Steve French
2021-04-12 16:16 ` Aurélien Aptel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).