diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-10-15 15:34:03 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2010-10-18 01:32:01 +0000 |
commit | 4477288a103631980750c86547d1fd54bfd2ba7d (patch) | |
tree | e0d56476a740f043f6687e063ff88d2982b4c444 /fs/cifs/cifsglob.h | |
parent | 7a16f1961a5c61d1f60d9e0d3d171cf7793fb5cb (diff) | |
download | blackbird-op-linux-4477288a103631980750c86547d1fd54bfd2ba7d.tar.gz blackbird-op-linux-4477288a103631980750c86547d1fd54bfd2ba7d.zip |
cifs: convert GlobalSMBSeslock from a rwlock to regular spinlock
Convert this lock to a regular spinlock
A rwlock_t offers little value here. It's more expensive than a regular
spinlock unless you have a fairly large section of code that runs under
the read lock and can benefit from the concurrency.
Additionally, we need to ensure that the refcounting for files isn't
racy and to do that we need to lock areas that can increment it for
write. That means that the areas that can actually use a read_lock are
very few and relatively infrequently used.
While we're at it, change the name to something easier to type, and fix
a bug in find_writable_file. cifsFileInfo_put can sleep and shouldn't be
called while holding the lock.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 9f99afab9a04..53899a8d7c4a 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -720,7 +720,7 @@ GLOBAL_EXTERN rwlock_t cifs_tcp_ses_lock; * If cifs_tcp_ses_lock and the lock below are both needed to be held, then * the cifs_tcp_ses_lock must be grabbed first and released last. */ -GLOBAL_EXTERN rwlock_t GlobalSMBSeslock; +GLOBAL_EXTERN spinlock_t cifs_file_list_lock; /* Outstanding dir notify requests */ GLOBAL_EXTERN struct list_head GlobalDnotifyReqList; |