diff options
Diffstat (limited to 'fs/lockd')
-rw-r--r-- | fs/lockd/host.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index dc41e46ef74c..230de93fc048 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
@@ -453,30 +453,14 @@ void nlm_release_host(struct nlm_host *host) | |||
453 | */ | 453 | */ |
454 | void nlm_host_rebooted(const struct nlm_reboot *info) | 454 | void nlm_host_rebooted(const struct nlm_reboot *info) |
455 | { | 455 | { |
456 | __be32 *p = (__be32 *)&info->priv.data; | ||
457 | const struct sockaddr_in sin = { | ||
458 | .sin_family = AF_INET, | ||
459 | .sin_addr.s_addr = *p, | ||
460 | }; | ||
461 | struct hlist_head *chain; | 456 | struct hlist_head *chain; |
462 | struct hlist_node *pos; | 457 | struct hlist_node *pos; |
463 | struct nsm_handle *nsm; | 458 | struct nsm_handle *nsm; |
464 | struct nlm_host *host; | 459 | struct nlm_host *host; |
465 | 460 | ||
466 | nsm = nsm_find((struct sockaddr *)&sin, sizeof(sin), | 461 | nsm = nsm_reboot_lookup(info); |
467 | info->mon, info->len, 0); | 462 | if (unlikely(nsm == NULL)) |
468 | if (nsm == NULL) { | ||
469 | dprintk("lockd: never saw rebooted peer '%.*s' before\n", | ||
470 | info->len, info->mon); | ||
471 | return; | 463 | return; |
472 | } | ||
473 | |||
474 | dprintk("lockd: nlm_host_rebooted(%.*s, %s)\n", | ||
475 | info->len, info->mon, nsm->sm_addrbuf); | ||
476 | |||
477 | /* When reclaiming locks on this peer, make sure that | ||
478 | * we set up a new notification */ | ||
479 | nsm->sm_monitored = 0; | ||
480 | 464 | ||
481 | /* Mark all hosts tied to this NSM state as having rebooted. | 465 | /* Mark all hosts tied to this NSM state as having rebooted. |
482 | * We run the loop repeatedly, because we drop the host table | 466 | * We run the loop repeatedly, because we drop the host table |