+/*!
+ * @brief Search for open fork by dirfd/name
+ *
+ * Function call of_fstatat with dirfd and path and uses dev and ino
+ * to search the open fork table.
+ *
+ * @param dirfd (r) directory fd
+ * @param path (rw) pointer to struct path
+ */
+#ifdef HAVE_RENAMEAT
+struct ofork *of_findnameat(int dirfd, struct path *path)
+{
+ struct ofork *of;
+ struct file_key key;
+
+ if ( ! path->st_valid) {
+ of_fstatat(dirfd, path);
+ }
+
+ if (path->st_errno)
+ return NULL;
+
+ key.dev = path->st.st_dev;
+ key.inode = path->st.st_ino;
+
+ for (of = ofork_table[hashfn(&key)]; of; of = of->next) {
+ if (key.dev == of->key.dev && key.inode == of->key.inode ) {
+ return of;
+ }
+ }
+
+ return NULL;
+}
+#endif
+