Linux-CIFS Archive mirror
 help / color / mirror / Atom feed
From: Paulo Alcantara <pc@manguebit.org>
To: "Kris Karas (Bug Reporting)" <bugs-a21@moonlit-rail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Linux Cifs <linux-cifs@vger.kernel.org>
Subject: Re: [REGRESSION] in Linux 7.0: empty CIFS mount point with vers=1.0
Date: Thu, 16 Apr 2026 19:39:17 -0300	[thread overview]
Message-ID: <9271841dd415d9d0b42ab91c575a1f91@manguebit.org> (raw)
In-Reply-To: <f758f4ff-4d54-4244-931d-38f469c3ff14@moonlit-rail.com>

"Kris Karas (Bug Reporting)" <bugs-a21@moonlit-rail.com> 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;
 }
 

  reply	other threads:[~2026-04-16 22:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16 21:20 [REGRESSION] in Linux 7.0: empty CIFS mount point with vers=1.0 Kris Karas (Bug Reporting)
2026-04-16 22:39 ` Paulo Alcantara [this message]
2026-04-17  0:51   ` Kris Karas (Bug Reporting)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9271841dd415d9d0b42ab91c575a1f91@manguebit.org \
    --to=pc@manguebit.org \
    --cc=bugs-a21@moonlit-rail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).