aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/mon.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd/mon.c')
-rw-r--r--fs/lockd/mon.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index a816b920d431..e02a1a4dfced 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -74,6 +74,8 @@ nsm_monitor(struct nlm_host *host)
74 int status; 74 int status;
75 75
76 dprintk("lockd: nsm_monitor(%s)\n", host->h_name); 76 dprintk("lockd: nsm_monitor(%s)\n", host->h_name);
77 if (host->h_monitored)
78 return 0;
77 79
78 status = nsm_mon_unmon(host, SM_MON, &res); 80 status = nsm_mon_unmon(host, SM_MON, &res);
79 81
@@ -91,15 +93,18 @@ int
91nsm_unmonitor(struct nlm_host *host) 93nsm_unmonitor(struct nlm_host *host)
92{ 94{
93 struct nsm_res res; 95 struct nsm_res res;
94 int status; 96 int status = 0;
95 97
96 dprintk("lockd: nsm_unmonitor(%s)\n", host->h_name); 98 dprintk("lockd: nsm_unmonitor(%s)\n", host->h_name);
97 99 if (!host->h_monitored)
98 status = nsm_mon_unmon(host, SM_UNMON, &res); 100 return 0;
99 if (status < 0) 101 host->h_monitored = 0;
100 printk(KERN_NOTICE "lockd: cannot unmonitor %s\n", host->h_name); 102
101 else 103 if (!host->h_killed) {
102 host->h_monitored = 0; 104 status = nsm_mon_unmon(host, SM_UNMON, &res);
105 if (status < 0)
106 printk(KERN_NOTICE "lockd: cannot unmonitor %s\n", host->h_name);
107 }
103 return status; 108 return status;
104} 109}
105 110