diff --git a/fs/locks.c b/fs/locks.c
index 39b038bfd5cc114a9f4cb0c7263103a2db227e02..e414a86f9d5cf9d8cb8104688ccdf867c3ed594f 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1356,8 +1356,9 @@ static int __setlease(struct file *filp, long arg, struct file_lock **flp)
 	if (!leases_enable)
 		goto out;
 
-	error = lease_alloc(filp, arg, &fl);
-	if (error)
+	error = -ENOMEM;
+	fl = locks_alloc_lock();
+	if (fl == NULL)
 		goto out;
 
 	locks_copy_lock(fl, lease);
@@ -1365,6 +1366,7 @@ static int __setlease(struct file *filp, long arg, struct file_lock **flp)
 	locks_insert_lock(before, fl);
 
 	*flp = fl;
+	error = 0;
 out:
 	return error;
 }