Backport: fd-tracker: add the unlink operation to fs handles
[lttng-tools.git] / src / common / fd-tracker / fd-tracker.c
index cdc1691f61da4c124032d0fe56384a7efdfeff7d..3720e075cba9ef7e6a4dc56cf92b23f6e8dafa72 100644 (file)
@@ -796,6 +796,18 @@ void fs_handle_put_fd(struct fs_handle *handle)
        pthread_mutex_unlock(&handle->lock);
 }
 
+int fs_handle_unlink(struct fs_handle *handle)
+{
+       int ret;
+
+       pthread_mutex_lock(&handle->tracker->lock);
+       pthread_mutex_lock(&handle->lock);
+       ret = lttng_inode_defer_unlink(handle->inode);
+       pthread_mutex_unlock(&handle->lock);
+       pthread_mutex_unlock(&handle->tracker->lock);
+       return ret;
+}
+
 int fs_handle_close(struct fs_handle *handle)
 {
        int ret = 0;
This page took 0.025951 seconds and 5 git commands to generate.