+ lttng_inode_borrow_location(handle->inode, NULL, &path);
+ /*
+ * Here a reference to the inode's directory handle is acquired
+ * to prevent the last reference to it from being released while
+ * the tracker's lock is taken.
+ *
+ * If this wasn't done, the directory handle could attempt to
+ * close its underlying directory file descriptor, which would
+ * attempt to lock the tracker's lock, resulting in a deadlock.
+ *
+ * Since a new reference to the directory handle is taken within
+ * the scope of this function, it is not possible for the last
+ * reference to the inode's location directory handle to be
+ * released during the call to lttng_inode_put().
+ *
+ * We wait until the tracker's lock is released to release the
+ * reference. Hence, the call to the tracker is delayed just
+ * enough to not attempt to recursively acquire the tracker's
+ * lock twice.
+ */
+ inode_directory_handle =
+ lttng_inode_get_location_directory_handle(
+ handle->inode);