|
@@ -460,8 +460,8 @@ out:
|
|
|
*/
|
|
|
__be32
|
|
|
nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
|
|
|
- struct nlm_lock *lock, struct nlm_lock *conflock,
|
|
|
- struct nlm_cookie *cookie)
|
|
|
+ struct nlm_host *host, struct nlm_lock *lock,
|
|
|
+ struct nlm_lock *conflock, struct nlm_cookie *cookie)
|
|
|
{
|
|
|
struct nlm_block *block = NULL;
|
|
|
int error;
|
|
@@ -479,16 +479,10 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
|
|
|
|
|
|
if (block == NULL) {
|
|
|
struct file_lock *conf = kzalloc(sizeof(*conf), GFP_KERNEL);
|
|
|
- struct nlm_host *host;
|
|
|
|
|
|
if (conf == NULL)
|
|
|
return nlm_granted;
|
|
|
- /* Create host handle for callback */
|
|
|
- host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len);
|
|
|
- if (host == NULL) {
|
|
|
- kfree(conf);
|
|
|
- return nlm_lck_denied_nolocks;
|
|
|
- }
|
|
|
+ nlm_get_host(host);
|
|
|
block = nlmsvc_create_block(rqstp, host, file, lock, cookie);
|
|
|
if (block == NULL) {
|
|
|
kfree(conf);
|