diff options
Diffstat (limited to 'fs/lockd/svcsubs.c')
-rw-r--r-- | fs/lockd/svcsubs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index 4cac77aec..1b1c41069 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c @@ -7,6 +7,7 @@ */ #include <linux/types.h> +#include <linux/string.h> #include <linux/sched.h> #include <linux/in.h> #include <linux/sunrpc/svc.h> @@ -26,7 +27,7 @@ #define FILE_NRHASH 32 #define FILE_HASH_BITS 5 static struct nlm_file * nlm_files[FILE_NRHASH]; -static struct semaphore nlm_file_sema = MUTEX; +static DECLARE_MUTEX(nlm_file_sema); static unsigned int file_hash(dev_t dev, ino_t ino) { @@ -76,7 +77,7 @@ nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result, memset(file, 0, sizeof(*file)); file->f_handle = *fh; - file->f_sema = MUTEX; + init_MUTEX(&file->f_sema); /* Open the file. Note that this must not sleep for too long, else * we would lock up lockd:-) So no NFS re-exports, folks. |