|
@@ -1421,8 +1421,9 @@ static int __setlease(struct file *filp, long arg, struct file_lock **flp)
|
|
if (!leases_enable)
|
|
if (!leases_enable)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
- error = lease_alloc(filp, arg, &fl);
|
|
|
|
- if (error)
|
|
|
|
|
|
+ error = -ENOMEM;
|
|
|
|
+ fl = locks_alloc_lock();
|
|
|
|
+ if (fl == NULL)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
locks_copy_lock(fl, lease);
|
|
locks_copy_lock(fl, lease);
|
|
@@ -1430,6 +1431,7 @@ static int __setlease(struct file *filp, long arg, struct file_lock **flp)
|
|
locks_insert_lock(before, fl);
|
|
locks_insert_lock(before, fl);
|
|
|
|
|
|
*flp = fl;
|
|
*flp = fl;
|
|
|
|
+ error = 0;
|
|
out:
|
|
out:
|
|
return error;
|
|
return error;
|
|
}
|
|
}
|