diff options
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index f6ab762bea99..c7b87e92f91b 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/nfsd/state.h> | 49 | #include <linux/nfsd/state.h> |
50 | #include <linux/nfsd/xdr4.h> | 50 | #include <linux/nfsd/xdr4.h> |
51 | #include <linux/namei.h> | 51 | #include <linux/namei.h> |
52 | #include <linux/mutex.h> | ||
52 | 53 | ||
53 | #define NFSDDBG_FACILITY NFSDDBG_PROC | 54 | #define NFSDDBG_FACILITY NFSDDBG_PROC |
54 | 55 | ||
@@ -77,11 +78,11 @@ static void nfs4_set_recdir(char *recdir); | |||
77 | 78 | ||
78 | /* Locking: | 79 | /* Locking: |
79 | * | 80 | * |
80 | * client_sema: | 81 | * client_mutex: |
81 | * protects clientid_hashtbl[], clientstr_hashtbl[], | 82 | * protects clientid_hashtbl[], clientstr_hashtbl[], |
82 | * unconfstr_hashtbl[], uncofid_hashtbl[]. | 83 | * unconfstr_hashtbl[], uncofid_hashtbl[]. |
83 | */ | 84 | */ |
84 | static DECLARE_MUTEX(client_sema); | 85 | static DEFINE_MUTEX(client_mutex); |
85 | 86 | ||
86 | static kmem_cache_t *stateowner_slab = NULL; | 87 | static kmem_cache_t *stateowner_slab = NULL; |
87 | static kmem_cache_t *file_slab = NULL; | 88 | static kmem_cache_t *file_slab = NULL; |
@@ -91,13 +92,13 @@ static kmem_cache_t *deleg_slab = NULL; | |||
91 | void | 92 | void |
92 | nfs4_lock_state(void) | 93 | nfs4_lock_state(void) |
93 | { | 94 | { |
94 | down(&client_sema); | 95 | mutex_lock(&client_mutex); |
95 | } | 96 | } |
96 | 97 | ||
97 | void | 98 | void |
98 | nfs4_unlock_state(void) | 99 | nfs4_unlock_state(void) |
99 | { | 100 | { |
100 | up(&client_sema); | 101 | mutex_unlock(&client_mutex); |
101 | } | 102 | } |
102 | 103 | ||
103 | static inline u32 | 104 | static inline u32 |