/* Obtain host handle */
if (!(host = nlmsvc_lookup_host(rqstp))
- || (argp->monitor && nsm_monitor(host) < 0))
+ || (argp->monitor && !host->h_monitored && nsm_monitor(host) < 0))
goto no_locks;
*hostp = host;
*filp = file;
/* Set up the missing parts of the file_lock structure */
- lock->fl.fl_file = &file->f_file;
+ lock->fl.fl_file = file->f_file;
lock->fl.fl_owner = (fl_owner_t) host;
+ lock->fl.fl_lmops = &nlmsvc_lock_operations;
}
return 0;