Skip to contentSkip to conversation

smb: minor cleanup to remove unused function declaration

PATCH In review Bharath SM 3 participants 6 messages Mar 17, 2025 – Jun 17, 2025

Subsystems (2)
lore
Share & tools
lore

Bharath SM

author
#0 lore raw

PATCH 1/3 smb: minor cleanup to remove unused function declaration

remove cifs_writev_complete declaration from header file

---
 fs/smb/client/cifsproto.h | 1 -
 1 file changed, 1 deletion(-)
fs/smb/client/cifsproto.h +0 -1
index 81680001944d..39322b4931da 100644
@@ -592,7 +592,6 @@ int cifs_async_readv(struct cifs_io_subrequest *rdata);
 int cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid);
 
 void cifs_async_writev(struct cifs_io_subrequest *wdata);
-void cifs_writev_complete(struct work_struct *work);
 int cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
 			  struct cifs_sb_info *cifs_sb,
 			  const unsigned char *path, char *pbuf,
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH 2/3 smb: mark the new channel addition log as informational log with cifs_info

For multichannel mounts, when a new channel is successfully opened we currently log 'successfully opened new channel on iface: <>' as cifs_dbg(VFS..) which is eventually translated into a pr_err log. Marking these informational logs as error logs may lead to confusion for users so they will now be logged as info logs instead.

---
 fs/smb/client/sess.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/smb/client/sess.c +1 -1
index faa80e7d54a6..b45b46b1b792 100644
@@ -242,7 +242,7 @@ int cifs_try_adding_channels(struct cifs_ses *ses)
 
 			iface->num_channels++;
 			iface->weight_fulfilled++;
-			cifs_dbg(VFS, "successfully opened new channel on iface:%pIS\n",
+			cifs_info("successfully opened new channel on iface:%pIS\n",
 				 &iface->sockaddr);
 			break;
 		}
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH 3/3 smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels

In reply to Bharath SM

When mounting a share with kerberos authentication with multichannel support, share mounts correctly, but fails to create secondary channels. This occurs because the hostname is not populated when adding the channels. The hostname is necessary for the userspace cifs.upcall program to retrieve the required credentials and pass it back to kernel, without hostname secondary channels fails establish.

---
 fs/smb/client/sess.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/smb/client/sess.c +1 -2
index b45b46b1b792..f2ab8513c3ed 100644
@@ -494,8 +494,7 @@ cifs_ses_add_channel(struct cifs_ses *ses,
 	ctx->domainauto = ses->domainAuto;
 	ctx->domainname = ses->domainName;
 
-	/* no hostname for extra channels */
-	ctx->server_hostname = "";
+	ctx->server_hostname = ses->server->hostname;
 
 	ctx->username = ses->user_name;
 	ctx->password = ses->password;
Signature · 1 line
2.43.0
#3 lore raw

Re: [PATCH 3/3] smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels

Quoted 31 lines · Bharath SM

When mounting a share with kerberos authentication with multichannel support, share mounts correctly, but fails to create secondary channels. This occurs because the hostname is not populated when adding the channels. The hostname is necessary for the userspace cifs.upcall program to retrieve the required credentials and pass it back to kernel, without hostname secondary channels fails establish.

---
 fs/smb/client/sess.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/smb/client/sess.c +1 -3
index b45b46b1b792..f2ab8513c3ed 100644
@@ -494,8 +494,7 @@ cifs_ses_add_channel(struct cifs_ses *ses,
        ctx->domainauto = ses->domainAuto;
        ctx->domainname = ses->domainName;
 
-       /* no hostname for extra channels */
-       ctx->server_hostname = "";
+       ctx->server_hostname = ses->server->hostname;
 
        ctx->username = ses->user_name;
        ctx->password = ses->password;
--
Quoted 3 lines

2.43.0

Looks good to me.
This one depends on one of the patches I submitted recently:
"cifs: dns resolution is needed only for primary channel"

Signature · 2 lines
Regards,
Shyam
#4 lore raw

Re: [PATCH 3/3] smb: fix secondary channel creation issue with kerberos by populating hostname when adding channels

added to cifs-2.6.git for-next

Quoted 43 lines · Shyam Prasad N
Quoted 31 lines · Bharath SM

When mounting a share with kerberos authentication with multichannel support, share mounts correctly, but fails to create secondary channels. This occurs because the hostname is not populated when adding the channels. The hostname is necessary for the userspace cifs.upcall program to retrieve the required credentials and pass it back to kernel, without hostname secondary channels fails establish.

---
 fs/smb/client/sess.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/smb/client/sess.c +1 -3
index b45b46b1b792..f2ab8513c3ed 100644
@@ -494,8 +494,7 @@ cifs_ses_add_channel(struct cifs_ses *ses,
        ctx->domainauto = ses->domainAuto;
        ctx->domainname = ses->domainName;
 
-       /* no hostname for extra channels */
-       ctx->server_hostname = "";
+       ctx->server_hostname = ses->server->hostname;
 
        ctx->username = ses->user_name;
        ctx->password = ses->password;
--
Quoted 3 lines

2.43.0

Looks good to me.
This one depends on one of the patches I submitted recently:
"cifs: dns resolution is needed only for primary channel"

--
Regards,
Shyam

Signature · 3 lines
Thanks,

Steve
#5 lore raw
In reply to Bharath SM

merged all three patches to cifs-2.6.git for-next pending additional review/testing (added Paulo Reviewed-by)

Quoted 23 lines · Bharath SM

remove cifs_writev_complete declaration from header file

---
 fs/smb/client/cifsproto.h | 1 -
 1 file changed, 1 deletion(-)
fs/smb/client/cifsproto.h +0 -2
index 81680001944d..39322b4931da 100644
@@ -592,7 +592,6 @@ int cifs_async_readv(struct cifs_io_subrequest *rdata);
 int cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid);
 
 void cifs_async_writev(struct cifs_io_subrequest *wdata);
-void cifs_writev_complete(struct work_struct *work);
 int cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
                          struct cifs_sb_info *cifs_sb,
                          const unsigned char *path, char *pbuf,
--

2.43.0

Signature · 3 lines
Thanks,

Steve