15
15
MODULE_LICENSE ("GPL" );
16
16
MODULE_DESCRIPTION ("NFS localio protocol bypass support" );
17
17
18
- static DEFINE_SPINLOCK (nfs_uuid_lock );
18
+ static DEFINE_SPINLOCK (nfs_uuids_lock );
19
19
20
20
/*
21
21
* Global list of nfs_uuid_t instances
22
- * that is protected by nfs_uuid_lock .
22
+ * that is protected by nfs_uuids_lock .
23
23
*/
24
24
static LIST_HEAD (nfs_uuids );
25
25
@@ -34,15 +34,15 @@ EXPORT_SYMBOL_GPL(nfs_uuid_init);
34
34
35
35
bool nfs_uuid_begin (nfs_uuid_t * nfs_uuid )
36
36
{
37
- spin_lock (& nfs_uuid_lock );
37
+ spin_lock (& nfs_uuids_lock );
38
38
/* Is this nfs_uuid already in use? */
39
39
if (!list_empty (& nfs_uuid -> list )) {
40
- spin_unlock (& nfs_uuid_lock );
40
+ spin_unlock (& nfs_uuids_lock );
41
41
return false;
42
42
}
43
43
uuid_gen (& nfs_uuid -> uuid );
44
44
list_add_tail (& nfs_uuid -> list , & nfs_uuids );
45
- spin_unlock (& nfs_uuid_lock );
45
+ spin_unlock (& nfs_uuids_lock );
46
46
47
47
return true;
48
48
}
@@ -51,10 +51,10 @@ EXPORT_SYMBOL_GPL(nfs_uuid_begin);
51
51
void nfs_uuid_end (nfs_uuid_t * nfs_uuid )
52
52
{
53
53
if (nfs_uuid -> net == NULL ) {
54
- spin_lock (& nfs_uuid_lock );
54
+ spin_lock (& nfs_uuids_lock );
55
55
if (nfs_uuid -> net == NULL )
56
56
list_del_init (& nfs_uuid -> list );
57
- spin_unlock (& nfs_uuid_lock );
57
+ spin_unlock (& nfs_uuids_lock );
58
58
}
59
59
}
60
60
EXPORT_SYMBOL_GPL (nfs_uuid_end );
@@ -78,7 +78,7 @@ void nfs_uuid_is_local(const uuid_t *uuid, struct list_head *list,
78
78
{
79
79
nfs_uuid_t * nfs_uuid ;
80
80
81
- spin_lock (& nfs_uuid_lock );
81
+ spin_lock (& nfs_uuids_lock );
82
82
nfs_uuid = nfs_uuid_lookup_locked (uuid );
83
83
if (nfs_uuid ) {
84
84
kref_get (& dom -> ref );
@@ -94,7 +94,7 @@ void nfs_uuid_is_local(const uuid_t *uuid, struct list_head *list,
94
94
__module_get (mod );
95
95
nfsd_mod = mod ;
96
96
}
97
- spin_unlock (& nfs_uuid_lock );
97
+ spin_unlock (& nfs_uuids_lock );
98
98
}
99
99
EXPORT_SYMBOL_GPL (nfs_uuid_is_local );
100
100
@@ -128,9 +128,9 @@ void nfs_localio_disable_client(struct nfs_client *clp)
128
128
129
129
spin_lock (& nfs_uuid -> lock );
130
130
if (test_and_clear_bit (NFS_CS_LOCAL_IO , & clp -> cl_flags )) {
131
- spin_lock (& nfs_uuid_lock );
131
+ spin_lock (& nfs_uuids_lock );
132
132
nfs_uuid_put_locked (nfs_uuid );
133
- spin_unlock (& nfs_uuid_lock );
133
+ spin_unlock (& nfs_uuids_lock );
134
134
}
135
135
spin_unlock (& nfs_uuid -> lock );
136
136
}
@@ -140,23 +140,23 @@ void nfs_localio_invalidate_clients(struct list_head *cl_uuid_list)
140
140
{
141
141
nfs_uuid_t * nfs_uuid , * tmp ;
142
142
143
- spin_lock (& nfs_uuid_lock );
143
+ spin_lock (& nfs_uuids_lock );
144
144
list_for_each_entry_safe (nfs_uuid , tmp , cl_uuid_list , list ) {
145
145
struct nfs_client * clp =
146
146
container_of (nfs_uuid , struct nfs_client , cl_uuid );
147
147
148
148
nfs_localio_disable_client (clp );
149
149
}
150
- spin_unlock (& nfs_uuid_lock );
150
+ spin_unlock (& nfs_uuids_lock );
151
151
}
152
152
EXPORT_SYMBOL_GPL (nfs_localio_invalidate_clients );
153
153
154
154
static void nfs_uuid_add_file (nfs_uuid_t * nfs_uuid , struct nfs_file_localio * nfl )
155
155
{
156
- spin_lock (& nfs_uuid_lock );
156
+ spin_lock (& nfs_uuids_lock );
157
157
if (!nfl -> nfs_uuid )
158
158
rcu_assign_pointer (nfl -> nfs_uuid , nfs_uuid );
159
- spin_unlock (& nfs_uuid_lock );
159
+ spin_unlock (& nfs_uuids_lock );
160
160
}
161
161
162
162
/*
@@ -217,14 +217,14 @@ void nfs_close_local_fh(struct nfs_file_localio *nfl)
217
217
ro_nf = rcu_access_pointer (nfl -> ro_file );
218
218
rw_nf = rcu_access_pointer (nfl -> rw_file );
219
219
if (ro_nf || rw_nf ) {
220
- spin_lock (& nfs_uuid_lock );
220
+ spin_lock (& nfs_uuids_lock );
221
221
if (ro_nf )
222
222
ro_nf = rcu_dereference_protected (xchg (& nfl -> ro_file , NULL ), 1 );
223
223
if (rw_nf )
224
224
rw_nf = rcu_dereference_protected (xchg (& nfl -> rw_file , NULL ), 1 );
225
225
226
226
rcu_assign_pointer (nfl -> nfs_uuid , NULL );
227
- spin_unlock (& nfs_uuid_lock );
227
+ spin_unlock (& nfs_uuids_lock );
228
228
rcu_read_unlock ();
229
229
230
230
if (ro_nf )
0 commit comments