/*
* Allow a maximum number of links. While ZFS does not internally limit
- * this most Linux filesystems do. It's probably a good idea to limit
- * this to a large value until it is validated that this is safe.
+ * this the inode->i_nlink member is defined as an unsigned int. To be
+ * safe we use 2^31-1 as the limit.
*/
-#define ZFS_LINK_MAX 65536
+#define ZFS_LINK_MAX ((1U << 31) - 1U)
/*
* Normal filesystems (those not under .zfs/snapshot) have a total