--- /dev/null
+Date: Fri, 13 Jun 2025 08:49:22 +0300
+Subject: [PATCH] mount_util.c: restore symlink check
+
+Fixes the following error when mounting iPhone using ifuse:
+ifuse /mnt --container com.httpstorm.httpstorm
+mount: mounting ifuse on /mnt failed: Invalid argument
+
+The regression was introduced in
+74b1df2e84e836a1710561f52075d51f20cd5c78
+
+---
+ lib/mount_util.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/lib/mount_util.c
++++ b/lib/mount_util.c
+@@ -54,6 +54,7 @@ static int mtab_needs_update(const char
+ * Skip mtab update if /etc/mtab:
+ *
+ * - doesn't exist,
++ * - is a symlink,
+ * - is on a read-only filesystem.
+ */
+ res = lstat(_PATH_MOUNTED, &stbuf);
+@@ -64,6 +65,9 @@ static int mtab_needs_update(const char
+ uid_t ruid;
+ int err;
+
++ if (S_ISLNK(stbuf.st_mode))
++ return 0;
++
+ ruid = getuid();
+ if (ruid != 0)
+ setreuid(0, -1);