[PATCH] knfsd: lockd: introduce nsm_handle
[cascardo/linux.git] / fs / lockd / clntlock.c
index 52774fe..54e63dd 100644 (file)
@@ -150,7 +150,8 @@ u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *lock)
 static void nlmclnt_prepare_reclaim(struct nlm_host *host)
 {
        down_write(&host->h_rwsem);
-       host->h_monitored = 0;
+       if (host->h_nsmhandle)
+               host->h_nsmhandle->sm_monitored = 0;
        host->h_state++;
        host->h_nextrebind = 0;
        nlm_rebind_host(host);
@@ -160,7 +161,7 @@ static void nlmclnt_prepare_reclaim(struct nlm_host *host)
         */
        list_splice_init(&host->h_granted, &host->h_reclaim);
 
-       dprintk("NLM: reclaiming locks for host %s", host->h_name);
+       dprintk("NLM: reclaiming locks for host %s\n", host->h_name);
 }
 
 static void nlmclnt_finish_reclaim(struct nlm_host *host)
@@ -202,7 +203,7 @@ reclaimer(void *ptr)
        /* This one ensures that our parent doesn't terminate while the
         * reclaim is in progress */
        lock_kernel();
-       lockd_up();
+       lockd_up(0); /* note: this cannot fail as lockd is already running */
 
        nlmclnt_prepare_reclaim(host);
        /* First, reclaim all locks that have been marked. */