Re: [REGRESSION] in Linux 7.0: empty CIFS mount point with vers=1.0

From: Paulo Alcantara

Date: Thu Apr 16 2026 - 18:39:52 EST


"Kris Karas (Bug Reporting)" <bugs-a21@xxxxxxxxxxxxxxxx> writes:

> A bit late to the party, sorry, I should have reported this in 7.0-rcX.
>
> When mounting a CIFS share with vers=1.0, the mount "succeeds" (is added
> to /proc/mounts) but the mountpoint is completely empty. Even "." and
> ".." are missing. Blindly accessing a known file results in "no such
> file or directory".

Thanks for the report.

Does the following fix your issue

diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
index 69b38f0ccf2b..7a4249628ac4 100644
--- a/fs/smb/client/connect.c
+++ b/fs/smb/client/connect.c
@@ -3628,6 +3628,7 @@ int cifs_mount_get_tcon(struct cifs_mount_ctx *mnt_ctx)
sbflags |= CIFS_MOUNT_POSIX_PATHS;
sbflags &= ~(CIFS_MOUNT_MAP_SFM_CHR |
CIFS_MOUNT_MAP_SPECIAL_CHR);
+ atomic_set(&cifs_sb->mnt_cifs_flags, sbflags);
}

#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
@@ -3652,6 +3653,7 @@ int cifs_mount_get_tcon(struct cifs_mount_ctx *mnt_ctx)
tcon->unix_ext = 0; /* server does not support them */

/* do not care if a following call succeed - informational */
+ sbflags = cifs_sb_flags(cifs_sb);
if (!tcon->pipe && server->ops->qfs_tcon) {
server->ops->qfs_tcon(mnt_ctx->xid, tcon, cifs_sb);
if (sbflags & CIFS_MOUNT_RO_CACHE) {
@@ -3675,7 +3677,6 @@ int cifs_mount_get_tcon(struct cifs_mount_ctx *mnt_ctx)

out:
mnt_ctx->tcon = tcon;
- atomic_set(&cifs_sb->mnt_cifs_flags, sbflags);
return rc;
}