cifs: convert cifs_tcp_ses_lock from a rwlock to a spinlock
authorSuresh Jayaraman <sjayaraman@suse.de>
Mon, 18 Oct 2010 17:59:37 +0000 (23:29 +0530)
committerSteve French <sfrench@us.ibm.com>
Thu, 21 Oct 2010 13:14:27 +0000 (13:14 +0000)
commit3f9bcca7820a6711307b6499952b13cfcfc31dd6
tree6c380f5877562778335d6794e1e4a297f8970d77
parent3e24e132878c83910b61eb7704511a6d96a0389f
cifs: convert cifs_tcp_ses_lock from a rwlock to a spinlock

cifs_tcp_ses_lock is a rwlock with protects the cifs_tcp_ses_list,
server->smb_ses_list and the ses->tcon_list. It also protects a few
ref counters in server, ses and tcon. In most cases the critical section
doesn't seem to be large, in a few cases where it is slightly large, there
seem to be really no benefit from concurrent access. I briefly considered RCU
mechanism but it appears to me that there is no real need.

Replace it with a spinlock and get rid of the last rwlock in the cifs code.

Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifs_debug.c
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/misc.c
fs/cifs/sess.c