diff options
author | Pavel Shilovsky <pshilovsky@samba.org> | 2012-09-19 09:22:43 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-09-24 22:46:32 -0400 |
commit | f45d34167c67b083b54690e349e77f59062ef0ea (patch) | |
tree | 6be4f2a62e99e348e6cab03a24a1c45889a6722f /fs/cifs/cifsglob.h | |
parent | 1c0bd60b560cdf63a263f8ff3cebe9f99fe7a47c (diff) |
CIFS: Remove spinlock dependence in brlock processing
Now we need to lock/unlock a spinlock while processing brlock ops
on the inode. Move brlocks of a fid to a separate list and attach
all such lists to the inode. This let us not hold a spinlock.
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 004672f9e16c..b2eb577b5f3f 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -890,13 +890,16 @@ struct cifs_fid { | |||
890 | #endif | 890 | #endif |
891 | }; | 891 | }; |
892 | 892 | ||
893 | struct cifs_fid_locks { | ||
894 | struct list_head llist; | ||
895 | struct cifsFileInfo *cfile; /* fid that owns locks */ | ||
896 | struct list_head locks; /* locks held by fid above */ | ||
897 | }; | ||
898 | |||
893 | struct cifsFileInfo { | 899 | struct cifsFileInfo { |
894 | struct list_head tlist; /* pointer to next fid owned by tcon */ | 900 | struct list_head tlist; /* pointer to next fid owned by tcon */ |
895 | struct list_head flist; /* next fid (file instance) for this inode */ | 901 | struct list_head flist; /* next fid (file instance) for this inode */ |
896 | struct list_head llist; /* | 902 | struct cifs_fid_locks *llist; /* brlocks held by this fid */ |
897 | * brlocks held by this fid, protected by | ||
898 | * lock_mutex from cifsInodeInfo structure | ||
899 | */ | ||
900 | unsigned int uid; /* allows finding which FileInfo structure */ | 903 | unsigned int uid; /* allows finding which FileInfo structure */ |
901 | __u32 pid; /* process id who opened file */ | 904 | __u32 pid; /* process id who opened file */ |
902 | struct cifs_fid fid; /* file id from remote */ | 905 | struct cifs_fid fid; /* file id from remote */ |
@@ -988,11 +991,8 @@ void cifsFileInfo_put(struct cifsFileInfo *cifs_file); | |||
988 | 991 | ||
989 | struct cifsInodeInfo { | 992 | struct cifsInodeInfo { |
990 | bool can_cache_brlcks; | 993 | bool can_cache_brlcks; |
991 | struct mutex lock_mutex; /* | 994 | struct list_head llist; /* locks helb by this inode */ |
992 | * protect the field above and llist | 995 | struct mutex lock_mutex; /* protect the fields above */ |
993 | * from every cifsFileInfo structure | ||
994 | * from openFileList | ||
995 | */ | ||
996 | /* BB add in lists for dirty pages i.e. write caching info for oplock */ | 996 | /* BB add in lists for dirty pages i.e. write caching info for oplock */ |
997 | struct list_head openFileList; | 997 | struct list_head openFileList; |
998 | __u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */ | 998 | __u32 cifsAttrs; /* e.g. DOS archive bit, sparse, compressed, system */ |