aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/clntlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd/clntlock.c')
-rw-r--r--fs/lockd/clntlock.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c
index a2717408c478..0796c45d0d4d 100644
--- a/fs/lockd/clntlock.c
+++ b/fs/lockd/clntlock.c
@@ -11,7 +11,7 @@
11#include <linux/slab.h> 11#include <linux/slab.h>
12#include <linux/time.h> 12#include <linux/time.h>
13#include <linux/nfs_fs.h> 13#include <linux/nfs_fs.h>
14#include <linux/sunrpc/clnt.h> 14#include <linux/sunrpc/addr.h>
15#include <linux/sunrpc/svc.h> 15#include <linux/sunrpc/svc.h>
16#include <linux/lockd/lockd.h> 16#include <linux/lockd/lockd.h>
17#include <linux/kthread.h> 17#include <linux/kthread.h>
@@ -220,10 +220,19 @@ reclaimer(void *ptr)
220{ 220{
221 struct nlm_host *host = (struct nlm_host *) ptr; 221 struct nlm_host *host = (struct nlm_host *) ptr;
222 struct nlm_wait *block; 222 struct nlm_wait *block;
223 struct nlm_rqst *req;
223 struct file_lock *fl, *next; 224 struct file_lock *fl, *next;
224 u32 nsmstate; 225 u32 nsmstate;
225 struct net *net = host->net; 226 struct net *net = host->net;
226 227
228 req = kmalloc(sizeof(*req), GFP_KERNEL);
229 if (!req) {
230 printk(KERN_ERR "lockd: reclaimer unable to alloc memory."
231 " Locks for %s won't be reclaimed!\n",
232 host->h_name);
233 return 0;
234 }
235
227 allow_signal(SIGKILL); 236 allow_signal(SIGKILL);
228 237
229 down_write(&host->h_rwsem); 238 down_write(&host->h_rwsem);
@@ -253,7 +262,7 @@ restart:
253 */ 262 */
254 if (signalled()) 263 if (signalled())
255 continue; 264 continue;
256 if (nlmclnt_reclaim(host, fl) != 0) 265 if (nlmclnt_reclaim(host, fl, req) != 0)
257 continue; 266 continue;
258 list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted); 267 list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted);
259 if (host->h_nsmstate != nsmstate) { 268 if (host->h_nsmstate != nsmstate) {
@@ -279,5 +288,6 @@ restart:
279 /* Release host handle after use */ 288 /* Release host handle after use */
280 nlmclnt_release_host(host); 289 nlmclnt_release_host(host);
281 lockd_down(net); 290 lockd_down(net);
291 kfree(req);
282 return 0; 292 return 0;
283} 293}