diff options
author | Jeff Layton <jlayton@redhat.com> | 2010-02-05 15:09:22 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2010-02-08 16:20:35 -0500 |
commit | 7e469af97eed947ba9204712601281a69ae8eb6c (patch) | |
tree | f4488e393995ae523ed6dea5370ddad7aa1505b5 /fs/lockd | |
parent | cdd30fa1664e0245fa64330c7cc2ddab7e47c223 (diff) |
lockd: don't clear sm_monitored on nsm_reboot_lookup
When lockd gets a notify downcall from statd, it'll search its hosts
cache and then clear the sm_monitored bit on the host it finds. The idea
is apparently to make lockd redo a SM_MON on the next lock request.
This is unnecessary and causes the kernel's NSM cache to go out of sync
with statd. statd doesn't stop monitoring a host when it gets a
SM_NOTIFY and there's no guarantee that another lock will occur after
the reclaim and before the unmount. In that event, no SM_UNMON will
occur.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/lockd')
-rw-r--r-- | fs/lockd/mon.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index f956651d0f6..fefa4df3f00 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c | |||
@@ -349,9 +349,9 @@ retry: | |||
349 | * nsm_reboot_lookup - match NLMPROC_SM_NOTIFY arguments to an nsm_handle | 349 | * nsm_reboot_lookup - match NLMPROC_SM_NOTIFY arguments to an nsm_handle |
350 | * @info: pointer to NLMPROC_SM_NOTIFY arguments | 350 | * @info: pointer to NLMPROC_SM_NOTIFY arguments |
351 | * | 351 | * |
352 | * Returns a matching nsm_handle if found in the nsm cache; the returned | 352 | * Returns a matching nsm_handle if found in the nsm cache. The returned |
353 | * nsm_handle's reference count is bumped and sm_monitored is cleared. | 353 | * nsm_handle's reference count is bumped. Otherwise returns NULL if some |
354 | * Otherwise returns NULL if some error occurred. | 354 | * error occurred. |
355 | */ | 355 | */ |
356 | struct nsm_handle *nsm_reboot_lookup(const struct nlm_reboot *info) | 356 | struct nsm_handle *nsm_reboot_lookup(const struct nlm_reboot *info) |
357 | { | 357 | { |
@@ -370,12 +370,6 @@ struct nsm_handle *nsm_reboot_lookup(const struct nlm_reboot *info) | |||
370 | atomic_inc(&cached->sm_count); | 370 | atomic_inc(&cached->sm_count); |
371 | spin_unlock(&nsm_lock); | 371 | spin_unlock(&nsm_lock); |
372 | 372 | ||
373 | /* | ||
374 | * During subsequent lock activity, force a fresh | ||
375 | * notification to be set up for this host. | ||
376 | */ | ||
377 | cached->sm_monitored = 0; | ||
378 | |||
379 | dprintk("lockd: host %s (%s) rebooted, cnt %d\n", | 373 | dprintk("lockd: host %s (%s) rebooted, cnt %d\n", |
380 | cached->sm_name, cached->sm_addrbuf, | 374 | cached->sm_name, cached->sm_addrbuf, |
381 | atomic_read(&cached->sm_count)); | 375 | atomic_read(&cached->sm_count)); |