1515MODULE_LICENSE ("GPL" );
1616MODULE_DESCRIPTION ("NFS localio protocol bypass support" );
1717
18- static DEFINE_SPINLOCK (nfs_uuid_lock );
18+ static DEFINE_SPINLOCK (nfs_uuids_lock );
1919
2020/*
2121 * Global list of nfs_uuid_t instances
22- * that is protected by nfs_uuid_lock .
22+ * that is protected by nfs_uuids_lock .
2323 */
2424static LIST_HEAD (nfs_uuids );
2525
@@ -34,15 +34,15 @@ EXPORT_SYMBOL_GPL(nfs_uuid_init);
3434
3535bool nfs_uuid_begin (nfs_uuid_t * nfs_uuid )
3636{
37- spin_lock (& nfs_uuid_lock );
37+ spin_lock (& nfs_uuids_lock );
3838 /* Is this nfs_uuid already in use? */
3939 if (!list_empty (& nfs_uuid -> list )) {
40- spin_unlock (& nfs_uuid_lock );
40+ spin_unlock (& nfs_uuids_lock );
4141 return false;
4242 }
4343 uuid_gen (& nfs_uuid -> uuid );
4444 list_add_tail (& nfs_uuid -> list , & nfs_uuids );
45- spin_unlock (& nfs_uuid_lock );
45+ spin_unlock (& nfs_uuids_lock );
4646
4747 return true;
4848}
@@ -51,10 +51,10 @@ EXPORT_SYMBOL_GPL(nfs_uuid_begin);
5151void nfs_uuid_end (nfs_uuid_t * nfs_uuid )
5252{
5353 if (nfs_uuid -> net == NULL ) {
54- spin_lock (& nfs_uuid_lock );
54+ spin_lock (& nfs_uuids_lock );
5555 if (nfs_uuid -> net == NULL )
5656 list_del_init (& nfs_uuid -> list );
57- spin_unlock (& nfs_uuid_lock );
57+ spin_unlock (& nfs_uuids_lock );
5858 }
5959}
6060EXPORT_SYMBOL_GPL (nfs_uuid_end );
@@ -78,7 +78,7 @@ void nfs_uuid_is_local(const uuid_t *uuid, struct list_head *list,
7878{
7979 nfs_uuid_t * nfs_uuid ;
8080
81- spin_lock (& nfs_uuid_lock );
81+ spin_lock (& nfs_uuids_lock );
8282 nfs_uuid = nfs_uuid_lookup_locked (uuid );
8383 if (nfs_uuid ) {
8484 kref_get (& dom -> ref );
@@ -94,7 +94,7 @@ void nfs_uuid_is_local(const uuid_t *uuid, struct list_head *list,
9494 __module_get (mod );
9595 nfsd_mod = mod ;
9696 }
97- spin_unlock (& nfs_uuid_lock );
97+ spin_unlock (& nfs_uuids_lock );
9898}
9999EXPORT_SYMBOL_GPL (nfs_uuid_is_local );
100100
@@ -128,9 +128,9 @@ void nfs_localio_disable_client(struct nfs_client *clp)
128128
129129 spin_lock (& nfs_uuid -> lock );
130130 if (test_and_clear_bit (NFS_CS_LOCAL_IO , & clp -> cl_flags )) {
131- spin_lock (& nfs_uuid_lock );
131+ spin_lock (& nfs_uuids_lock );
132132 nfs_uuid_put_locked (nfs_uuid );
133- spin_unlock (& nfs_uuid_lock );
133+ spin_unlock (& nfs_uuids_lock );
134134 }
135135 spin_unlock (& nfs_uuid -> lock );
136136}
@@ -140,23 +140,23 @@ void nfs_localio_invalidate_clients(struct list_head *cl_uuid_list)
140140{
141141 nfs_uuid_t * nfs_uuid , * tmp ;
142142
143- spin_lock (& nfs_uuid_lock );
143+ spin_lock (& nfs_uuids_lock );
144144 list_for_each_entry_safe (nfs_uuid , tmp , cl_uuid_list , list ) {
145145 struct nfs_client * clp =
146146 container_of (nfs_uuid , struct nfs_client , cl_uuid );
147147
148148 nfs_localio_disable_client (clp );
149149 }
150- spin_unlock (& nfs_uuid_lock );
150+ spin_unlock (& nfs_uuids_lock );
151151}
152152EXPORT_SYMBOL_GPL (nfs_localio_invalidate_clients );
153153
154154static void nfs_uuid_add_file (nfs_uuid_t * nfs_uuid , struct nfs_file_localio * nfl )
155155{
156- spin_lock (& nfs_uuid_lock );
156+ spin_lock (& nfs_uuids_lock );
157157 if (!nfl -> nfs_uuid )
158158 rcu_assign_pointer (nfl -> nfs_uuid , nfs_uuid );
159- spin_unlock (& nfs_uuid_lock );
159+ spin_unlock (& nfs_uuids_lock );
160160}
161161
162162/*
@@ -217,14 +217,14 @@ void nfs_close_local_fh(struct nfs_file_localio *nfl)
217217 ro_nf = rcu_access_pointer (nfl -> ro_file );
218218 rw_nf = rcu_access_pointer (nfl -> rw_file );
219219 if (ro_nf || rw_nf ) {
220- spin_lock (& nfs_uuid_lock );
220+ spin_lock (& nfs_uuids_lock );
221221 if (ro_nf )
222222 ro_nf = rcu_dereference_protected (xchg (& nfl -> ro_file , NULL ), 1 );
223223 if (rw_nf )
224224 rw_nf = rcu_dereference_protected (xchg (& nfl -> rw_file , NULL ), 1 );
225225
226226 rcu_assign_pointer (nfl -> nfs_uuid , NULL );
227- spin_unlock (& nfs_uuid_lock );
227+ spin_unlock (& nfs_uuids_lock );
228228 rcu_read_unlock ();
229229
230230 if (ro_nf )
0 commit comments