patch-2.4.11-dontuse linux/fs/lockd/clntproc.c
Next file: linux/fs/lockd/host.c
Previous file: linux/fs/lockd/clntlock.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Mon Oct 8 12:36:07 2001
- Orig file:
v2.4.10/linux/fs/lockd/clntproc.c
- Orig date:
Sun Sep 23 11:41:00 2001
diff -u --recursive --new-file v2.4.10/linux/fs/lockd/clntproc.c linux/fs/lockd/clntproc.c
@@ -18,6 +18,7 @@
#include <linux/lockd/sm_inter.h>
#define NLMDBG_FACILITY NLMDBG_CLIENT
+#define NLMCLNT_GRACE_WAIT (5*HZ)
static int nlmclnt_test(struct nlm_rqst *, struct file_lock *);
static int nlmclnt_lock(struct nlm_rqst *, struct file_lock *);
@@ -557,19 +558,22 @@
if (task->tk_status < 0) {
dprintk("lockd: unlock failed (err = %d)\n", -task->tk_status);
- goto retry_unlock;
+ goto retry_rebind;
}
- if (status != NLM_LCK_GRANTED
- && status != NLM_LCK_DENIED_GRACE_PERIOD) {
- printk("lockd: unexpected unlock status: %d\n", status);
+ if (status == NLM_LCK_DENIED_GRACE_PERIOD) {
+ rpc_delay(task, NLMCLNT_GRACE_WAIT);
+ goto retry_unlock;
}
+ if (status != NLM_LCK_GRANTED)
+ printk(KERN_WARNING "lockd: unexpected unlock status: %d\n", status);
die:
nlm_release_host(req->a_host);
kfree(req);
return;
- retry_unlock:
+ retry_rebind:
nlm_rebind_host(req->a_host);
+ retry_unlock:
rpc_restart_call(task);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)