Commit 9fee4902 authored by Chuck Lever's avatar Chuck Lever Committed by J. Bruce Fields

NSM: Use sm_name instead of h_name in nsm_monitor() and nsm_unmonitor()

Clean up: Use the sm_name field for reporting the hostname in nsm_monitor()
and nsm_unmonitor(), just as the other functions in fs/lockd/mon.c do.

The h_name field is just a copy of the sm_name pointer.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 29ed1407
...@@ -79,7 +79,7 @@ nsm_monitor(struct nlm_host *host) ...@@ -79,7 +79,7 @@ nsm_monitor(struct nlm_host *host)
struct nsm_res res; struct nsm_res res;
int status; int status;
dprintk("lockd: nsm_monitor(%s)\n", host->h_name); dprintk("lockd: nsm_monitor(%s)\n", nsm->sm_name);
BUG_ON(nsm == NULL); BUG_ON(nsm == NULL);
if (nsm->sm_monitored) if (nsm->sm_monitored)
...@@ -94,7 +94,7 @@ nsm_monitor(struct nlm_host *host) ...@@ -94,7 +94,7 @@ nsm_monitor(struct nlm_host *host)
status = nsm_mon_unmon(nsm, SM_MON, &res); status = nsm_mon_unmon(nsm, SM_MON, &res);
if (status < 0 || res.status != 0) if (status < 0 || res.status != 0)
printk(KERN_NOTICE "lockd: cannot monitor %s\n", host->h_name); printk(KERN_NOTICE "lockd: cannot monitor %s\n", nsm->sm_name);
else else
nsm->sm_monitored = 1; nsm->sm_monitored = 1;
return status; return status;
...@@ -116,12 +116,12 @@ nsm_unmonitor(struct nlm_host *host) ...@@ -116,12 +116,12 @@ nsm_unmonitor(struct nlm_host *host)
if (atomic_read(&nsm->sm_count) == 1 if (atomic_read(&nsm->sm_count) == 1
&& nsm->sm_monitored && !nsm->sm_sticky) { && nsm->sm_monitored && !nsm->sm_sticky) {
dprintk("lockd: nsm_unmonitor(%s)\n", host->h_name); dprintk("lockd: nsm_unmonitor(%s)\n", nsm->sm_name);
status = nsm_mon_unmon(nsm, SM_UNMON, &res); status = nsm_mon_unmon(nsm, SM_UNMON, &res);
if (status < 0) if (status < 0)
printk(KERN_NOTICE "lockd: cannot unmonitor %s\n", printk(KERN_NOTICE "lockd: cannot unmonitor %s\n",
host->h_name); nsm->sm_name);
else else
nsm->sm_monitored = 0; nsm->sm_monitored = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment