diff options
Diffstat (limited to 'fs/lockd/host.c')
-rw-r--r-- | fs/lockd/host.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 1bf384307d15..a1423c66df04 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
@@ -462,7 +462,11 @@ __nsm_find(const struct sockaddr_in *sin, | |||
462 | list_for_each(pos, &nsm_handles) { | 462 | list_for_each(pos, &nsm_handles) { |
463 | nsm = list_entry(pos, struct nsm_handle, sm_link); | 463 | nsm = list_entry(pos, struct nsm_handle, sm_link); |
464 | 464 | ||
465 | if (!nlm_cmp_addr(&nsm->sm_addr, sin)) | 465 | if (hostname && nsm_use_hostnames) { |
466 | if (strlen(nsm->sm_name) != hostname_len | ||
467 | || memcmp(nsm->sm_name, hostname, hostname_len)) | ||
468 | continue; | ||
469 | } else if (!nlm_cmp_addr(&nsm->sm_addr, sin)) | ||
466 | continue; | 470 | continue; |
467 | atomic_inc(&nsm->sm_count); | 471 | atomic_inc(&nsm->sm_count); |
468 | goto out; | 472 | goto out; |