diff options
Diffstat (limited to 'fs/lockd')
-rw-r--r-- | fs/lockd/clntlock.c | 2 | ||||
-rw-r--r-- | fs/lockd/clntproc.c | 2 | ||||
-rw-r--r-- | fs/lockd/host.c | 4 | ||||
-rw-r--r-- | fs/lockd/svcsubs.c | 3 |
4 files changed, 5 insertions, 6 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index 52774feab93f..f95cc3f3c42d 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c | |||
@@ -160,7 +160,7 @@ static void nlmclnt_prepare_reclaim(struct nlm_host *host) | |||
160 | */ | 160 | */ |
161 | list_splice_init(&host->h_granted, &host->h_reclaim); | 161 | list_splice_init(&host->h_granted, &host->h_reclaim); |
162 | 162 | ||
163 | dprintk("NLM: reclaiming locks for host %s", host->h_name); | 163 | dprintk("NLM: reclaiming locks for host %s\n", host->h_name); |
164 | } | 164 | } |
165 | 165 | ||
166 | static void nlmclnt_finish_reclaim(struct nlm_host *host) | 166 | static void nlmclnt_finish_reclaim(struct nlm_host *host) |
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index 50dbb67ae0c4..271e2165fff6 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c | |||
@@ -100,7 +100,7 @@ static struct nlm_lockowner *nlm_find_lockowner(struct nlm_host *host, fl_owner_ | |||
100 | res = __nlm_find_lockowner(host, owner); | 100 | res = __nlm_find_lockowner(host, owner); |
101 | if (res == NULL) { | 101 | if (res == NULL) { |
102 | spin_unlock(&host->h_lock); | 102 | spin_unlock(&host->h_lock); |
103 | new = (struct nlm_lockowner *)kmalloc(sizeof(*new), GFP_KERNEL); | 103 | new = kmalloc(sizeof(*new), GFP_KERNEL); |
104 | spin_lock(&host->h_lock); | 104 | spin_lock(&host->h_lock); |
105 | res = __nlm_find_lockowner(host, owner); | 105 | res = __nlm_find_lockowner(host, owner); |
106 | if (res == NULL && new != NULL) { | 106 | if (res == NULL && new != NULL) { |
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 703fb038c813..a0d0b58ce7a4 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
@@ -99,9 +99,9 @@ nlm_lookup_host(int server, struct sockaddr_in *sin, | |||
99 | /* Ooops, no host found, create it */ | 99 | /* Ooops, no host found, create it */ |
100 | dprintk("lockd: creating host entry\n"); | 100 | dprintk("lockd: creating host entry\n"); |
101 | 101 | ||
102 | if (!(host = (struct nlm_host *) kmalloc(sizeof(*host), GFP_KERNEL))) | 102 | host = kzalloc(sizeof(*host), GFP_KERNEL); |
103 | if (!host) | ||
103 | goto nohost; | 104 | goto nohost; |
104 | memset(host, 0, sizeof(*host)); | ||
105 | 105 | ||
106 | addr = sin->sin_addr.s_addr; | 106 | addr = sin->sin_addr.s_addr; |
107 | sprintf(host->h_name, "%u.%u.%u.%u", NIPQUAD(addr)); | 107 | sprintf(host->h_name, "%u.%u.%u.%u", NIPQUAD(addr)); |
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index 01b4db9e5466..a92dd98f8401 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c | |||
@@ -100,11 +100,10 @@ nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result, | |||
100 | nlm_debug_print_fh("creating file for", f); | 100 | nlm_debug_print_fh("creating file for", f); |
101 | 101 | ||
102 | nfserr = nlm_lck_denied_nolocks; | 102 | nfserr = nlm_lck_denied_nolocks; |
103 | file = (struct nlm_file *) kmalloc(sizeof(*file), GFP_KERNEL); | 103 | file = kzalloc(sizeof(*file), GFP_KERNEL); |
104 | if (!file) | 104 | if (!file) |
105 | goto out_unlock; | 105 | goto out_unlock; |
106 | 106 | ||
107 | memset(file, 0, sizeof(*file)); | ||
108 | memcpy(&file->f_handle, f, sizeof(struct nfs_fh)); | 107 | memcpy(&file->f_handle, f, sizeof(struct nfs_fh)); |
109 | file->f_hash = hash; | 108 | file->f_hash = hash; |
110 | init_MUTEX(&file->f_sema); | 109 | init_MUTEX(&file->f_sema); |