Merge tag 'xfs-6.9-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[linux-block.git] / fs / xfs / libxfs / xfs_dir2.h
index 19af22a16c415705ef545d7736c1244771a9fc24..8497d041f3163b1de31e0262fd0d2941a8be611c 100644 (file)
@@ -22,6 +22,19 @@ struct xfs_dir3_icfree_hdr;
 struct xfs_dir3_icleaf_hdr;
 
 extern const struct xfs_name   xfs_name_dotdot;
+extern const struct xfs_name   xfs_name_dot;
+
+static inline bool
+xfs_dir2_samename(
+       const struct xfs_name   *n1,
+       const struct xfs_name   *n2)
+{
+       if (n1 == n2)
+               return true;
+       if (n1->len != n2->len)
+               return false;
+       return !memcmp(n1->name, n2->name, n1->len);
+}
 
 /*
  * Convert inode mode to directory entry filetype