From 312d9898dc295204f36527b9ae32b08791e6fe6e Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Fri, 5 Dec 2008 19:03:54 -0500 Subject: [PATCH] --- yaml --- r: 127467 b: refs/heads/master c: 8c7378fd2a5f22016542931b887a2ae98d146eaf h: refs/heads/master i: 127465: 842ef3da9b7d729b0d6205422e4c89cbfbe1047f 127463: 483c3e3f3988841d087d17b4efb6d016951f06c7 v: v3 --- [refs] | 2 +- trunk/fs/lockd/host.c | 20 ++------------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index ca934e8b4191..dd01b4ab551f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3420a8c4359a189f7d854ed7075d151257415447 +refs/heads/master: 8c7378fd2a5f22016542931b887a2ae98d146eaf diff --git a/trunk/fs/lockd/host.c b/trunk/fs/lockd/host.c index dc41e46ef74c..230de93fc048 100644 --- a/trunk/fs/lockd/host.c +++ b/trunk/fs/lockd/host.c @@ -453,30 +453,14 @@ void nlm_release_host(struct nlm_host *host) */ void nlm_host_rebooted(const struct nlm_reboot *info) { - __be32 *p = (__be32 *)&info->priv.data; - const struct sockaddr_in sin = { - .sin_family = AF_INET, - .sin_addr.s_addr = *p, - }; struct hlist_head *chain; struct hlist_node *pos; struct nsm_handle *nsm; struct nlm_host *host; - nsm = nsm_find((struct sockaddr *)&sin, sizeof(sin), - info->mon, info->len, 0); - if (nsm == NULL) { - dprintk("lockd: never saw rebooted peer '%.*s' before\n", - info->len, info->mon); + nsm = nsm_reboot_lookup(info); + if (unlikely(nsm == NULL)) return; - } - - dprintk("lockd: nlm_host_rebooted(%.*s, %s)\n", - info->len, info->mon, nsm->sm_addrbuf); - - /* When reclaiming locks on this peer, make sure that - * we set up a new notification */ - nsm->sm_monitored = 0; /* Mark all hosts tied to this NSM state as having rebooted. * We run the loop repeatedly, because we drop the host table