aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/clntproc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:05 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:05 -0500
commit36943fa4b2701b9ef2d60084c85ecbe634aec252 (patch)
treea234dbfff1f7d46a8202e0666ac7666d39b420ae /fs/lockd/clntproc.c
parent47831f35b83e43c804215712dd0c834c92e8a441 (diff)
NLM: nlm_alloc_call should not immediately fail on signal
Currently, nlm_alloc_call tests for a signal before it even tries to allocate memory. Fix it so that it tries at least once. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd/clntproc.c')
-rw-r--r--fs/lockd/clntproc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 970b6a6aa337..615a988a92a7 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -291,14 +291,15 @@ nlmclnt_alloc_call(void)
291{ 291{
292 struct nlm_rqst *call; 292 struct nlm_rqst *call;
293 293
294 while (!signalled()) { 294 for(;;) {
295 call = (struct nlm_rqst *) kmalloc(sizeof(struct nlm_rqst), GFP_KERNEL); 295 call = kzalloc(sizeof(*call), GFP_KERNEL);
296 if (call) { 296 if (call != NULL) {
297 memset(call, 0, sizeof(*call));
298 locks_init_lock(&call->a_args.lock.fl); 297 locks_init_lock(&call->a_args.lock.fl);
299 locks_init_lock(&call->a_res.lock.fl); 298 locks_init_lock(&call->a_res.lock.fl);
300 return call; 299 return call;
301 } 300 }
301 if (signalled())
302 break;
302 printk("nlmclnt_alloc_call: failed, waiting for memory\n"); 303 printk("nlmclnt_alloc_call: failed, waiting for memory\n");
303 schedule_timeout_interruptible(5*HZ); 304 schedule_timeout_interruptible(5*HZ);
304 } 305 }