summaryrefslogtreecommitdiffstats
path: root/utils/statd/monitor.c
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2008-12-17 16:41:35 -0500
committerSteve Dickson <steved@redhat.com>2008-12-17 16:41:35 -0500
commitbc870150cc2116584aee288d15ac2b9a2f825ff5 (patch)
tree92f50f1e0d68835eb6a247ddb86772fe4173f9c9 /utils/statd/monitor.c
parentf846abde5faa4742b4823fa981080b1f5dac66b1 (diff)
downloadnfs-utils-bc870150cc2116584aee288d15ac2b9a2f825ff5.tar.gz
nfs-utils-bc870150cc2116584aee288d15ac2b9a2f825ff5.tar.xz
nfs-utils-bc870150cc2116584aee288d15ac2b9a2f825ff5.zip
statd: not unlinking host files
Statd is not unlinking host files during SM_UNMON and SM_UNMON_ALL calls because the given host is still on the run-time notify list (rtnl) and the check flag is set when xunlink() is called. But the next thing the caller of xunlink() does is remove the host from the rtnl list which means the unlink will never happen. So this patch removes the check flag from xunlink() since its not needed and correctly allocates and frees memory used by xunlink(). Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/statd/monitor.c')
-rw-r--r--utils/statd/monitor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/statd/monitor.c b/utils/statd/monitor.c
index a6a1d9c..24c2531 100644
--- a/utils/statd/monitor.c
+++ b/utils/statd/monitor.c
@@ -352,7 +352,7 @@ sm_unmon_1_svc(struct mon_id *argp, struct svc_req *rqstp)
/* PRC: do the HA callout: */
ha_callout("del-client", mon_name, my_name, -1);
- xunlink(SM_DIR, clnt->dns_name, 1);
+ xunlink(SM_DIR, clnt->dns_name);
nlist_free(&rtnl, clnt);
return (&result);
@@ -404,7 +404,7 @@ sm_unmon_all_1_svc(struct my_id *argp, struct svc_req *rqstp)
temp = NL_NEXT(clnt);
/* PRC: do the HA callout: */
ha_callout("del-client", mon_name, my_name, -1);
- xunlink(SM_DIR, clnt->dns_name, 1);
+ xunlink(SM_DIR, clnt->dns_name);
nlist_free(&rtnl, clnt);
++count;
clnt = temp;