relayd: track directory handles through the fd-tracker
[lttng-tools.git] / src / common / fd-tracker / inode.c
index 0e1ebc6ff5dc51b2fe93ea7208c13ac17f5136c6..727f6141aba4d78de12bf77ec3f688ef6c8bf92f 100644 (file)
@@ -280,7 +280,19 @@ void lttng_inode_put(struct lttng_inode *inode)
        urcu_ref_put(&inode->ref, lttng_inode_release);
 }
 
-void lttng_inode_get_location(struct lttng_inode *inode,
+struct lttng_directory_handle *lttng_inode_get_location_directory_handle(
+               struct lttng_inode *inode)
+{
+       if (inode->location.directory_handle) {
+               const bool reference_acquired = lttng_directory_handle_get(
+                               inode->location.directory_handle);
+
+               assert(reference_acquired);
+       }
+       return inode->location.directory_handle;
+}
+
+void lttng_inode_borrow_location(struct lttng_inode *inode,
                const struct lttng_directory_handle **out_directory_handle,
                const char **out_path)
 {
This page took 0.023488 seconds and 4 git commands to generate.