]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/lockd/svclock.c
lockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_testlock
[linux-2.6-omap-h63xx.git] / fs / lockd / svclock.c
index 81aca859bfde909f2574c2c7f9e9e02608a1a165..f40afb3a0e69124ce7eca769f56f05a18eb05e75 100644 (file)
@@ -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);