]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfsd/lockd.c
nfsd: Drop reference in expkey_parse error cases
[linux-2.6-omap-h63xx.git] / fs / nfsd / lockd.c
index 6b6225ac4926f8364762ed5c74bda3a5681235b7..b2786a5f9afefaaea3573303339cd7154ad54bd7 100644 (file)
 
 #define NFSDDBG_FACILITY               NFSDDBG_LOCKD
 
+#ifdef CONFIG_LOCKD_V4
+#define nlm_stale_fh   nlm4_stale_fh
+#define nlm_failed     nlm4_failed
+#else
+#define nlm_stale_fh   nlm_lck_denied_nolocks
+#define nlm_failed     nlm_lck_denied_nolocks
+#endif
 /*
  * Note: we hold the dentry use count while the file is open.
  */
@@ -47,12 +54,10 @@ nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp)
                return 0;
        case nfserr_dropit:
                return nlm_drop_reply;
-#ifdef CONFIG_LOCKD_V4
        case nfserr_stale:
-               return nlm4_stale_fh;
-#endif
+               return nlm_stale_fh;
        default:
-               return nlm_lck_denied;
+               return nlm_failed;
        }
 }
 
@@ -65,7 +70,6 @@ nlm_fclose(struct file *filp)
 static struct nlmsvc_binding   nfsd_nlm_ops = {
        .fopen          = nlm_fopen,            /* open file for locking */
        .fclose         = nlm_fclose,           /* close file */
-       .get_grace_period = get_nfs4_grace_period,
 };
 
 void