+ * Release a lease.
+ *
+ * \param fd File to remove the lease from.
+ *
+ * \retval type of the lease that was removed (LL_LEASE_READ or LL_LEASE_WRITE).
+ * \retval 0 if no lease was present.
+ * \retval -errno on error.
+ */
+int llapi_lease_release(int fd)
+{
+ struct ll_ioc_lease data = { .lil_mode = LL_LEASE_UNLCK };
+
+ return llapi_lease_set(fd, &data);
+}
+
+/**
+ * Release a lease with intent operation. This API will release the lease
+ * and execute the intent operation atomically.
+ *
+ * \param fd File to remove the lease from.
+ *
+ * \retval type of the lease that was removed (LL_LEASE_READ or LL_LEASE_WRITE).
+ * \retval 0 if no lease was present.
+ * \retval -EBUSY lease broken, intent operation not executed.
+ * \retval -errno on error.
+ */
+int llapi_lease_release_intent(int fd, struct ll_ioc_lease *data)
+{
+ if (data->lil_mode != LL_LEASE_UNLCK)
+ return -EINVAL;
+
+ return llapi_lease_set(fd, data);
+}
+
+/**