Steve French <smfrench@xxxxxxxxx> 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)