Skip to contentSkip to conversation

linux-next: build failure after merge of the cifsd tree

PATCH Stephen Rothwell 3 participants 3 messages Mar 17, 2021 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the cifsd tree, today's linux-next build (powerpc allyesconfig) failed like this:

ld: fs/cifsd/misc.o:(.opd+0xc0): multiple definition of `extract_sharename'; fs/cifs/unc.o:(.opd+0x18): first defined here
ld: fs/cifsd/misc.o: in function `.extract_sharename':
misc.c:(.text.extract_sharename+0x0): multiple definition of `.extract_sharename'; fs/cifs/unc.o:unc.c:(.text.extract_sharename+0x0): first defined here

Caused by commit

cabcebc31de4 ("cifsd: introduce SMB3 kernel server")

I applied the following patch for today:

From: Stephen Rothwell <[email protected]>
Date: Wed, 17 Mar 2021 18:35:55 +1100
Subject: [PATCH] cifsd: uniquify extract_sharename()

---
 fs/cifsd/misc.c    | 4 ++--
 fs/cifsd/misc.h    | 2 +-
 fs/cifsd/smb2pdu.c | 2 +-
 fs/cifsd/unicode.h | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
fs/cifsd/misc.c +2 -2
index 9e689c33f7bb..2e83cfc43be9 100644
@@ -210,12 +210,12 @@ void ksmbd_conv_path_to_windows(char *path)
 }
 
 /**
- * extract_sharename() - get share name from tree connect request
+ * cifsd_extract_sharename() - get share name from tree connect request
  * @treename:	buffer containing tree name and share name
  *
  * Return:      share name on success, otherwise error
  */
-char *extract_sharename(char *treename)
+char *cifsd_extract_sharename(char *treename)
 {
 	char *name = treename;
 	char *dst;
fs/cifsd/misc.h +1 -1
index d67843aad509..4cb0d4bebb21 100644
@@ -25,7 +25,7 @@ void ksmbd_conv_path_to_unix(char *path);
 void ksmbd_strip_last_slash(char *path);
 void ksmbd_conv_path_to_windows(char *path);
 
-char *extract_sharename(char *treename);
+char *cifsd_extract_sharename(char *treename);
 
 char *convert_to_unix_name(struct ksmbd_share_config *share, char *name);
 
fs/cifsd/smb2pdu.c +1 -1
index b20cc07ee809..3da96ebeae8b 100644
@@ -1709,7 +1709,7 @@ int smb2_tree_connect(struct ksmbd_work *work)
 		goto out_err1;
 	}
 
-	name = extract_sharename(treename);
+	name = cifsd_extract_sharename(treename);
 	if (IS_ERR(name)) {
 		status.ret = KSMBD_TREE_CONN_STATUS_ERROR;
 		goto out_err1;
fs/cifsd/unicode.h +1 -1
index 228a02c9b95d..16269c098f86 100644
@@ -69,7 +69,7 @@ char *smb_strndup_from_utf16(const char *src, const int maxlen,
 		const struct nls_table *codepage);
 extern int smbConvertToUTF16(__le16 *target, const char *source, int srclen,
 		const struct nls_table *cp, int mapchars);
-extern char *extract_sharename(char *treename);
+extern char *cifsd_extract_sharename(char *treename);
 #endif
 
 wchar_t cifs_toupper(wchar_t in);
Signature · 5 lines
2.30.0

-- 
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 13 lines · Stephen Rothwell

Hi all,

After merging the cifsd tree, today's linux-next build (powerpc allyesconfig) failed like this:

ld: fs/cifsd/misc.o:(.opd+0xc0): multiple definition of `extract_sharename'; fs/cifs/unc.o:(.opd+0x18): first defined here
ld: fs/cifsd/misc.o: in function `.extract_sharename':
misc.c:(.text.extract_sharename+0x0): multiple definition of `.extract_sharename'; fs/cifs/unc.o:unc.c:(.text.extract_sharename+0x0): first defined here

Caused by commit

cabcebc31de4 ("cifsd: introduce SMB3 kernel server")

Quoted 7 lines

I applied the following patch for today:

From: Stephen Rothwell <[email protected]>
Date: Wed, 17 Mar 2021 18:35:55 +1100
Subject: [PATCH] cifsd: uniquify extract_sharename()

Thanks!

#2 lore raw
In reply to Stephen Rothwell

Hi Stephen,

Quoted 11 lines

Hi all,

After merging the cifsd tree, today's linux-next build (powerpc allyesconfig) failed like this:

ld: fs/cifsd/misc.o:(.opd+0xc0): multiple definition of `extract_sharename'; fs/cifs/unc.o:(.opd+0x18):
first defined here
ld: fs/cifsd/misc.o: in function `.extract_sharename':
misc.c:(.text.extract_sharename+0x0): multiple definition of `.extract_sharename'; fs/cifs/unc.o:unc.c:(.text.extract_sharename+0x0): first defined here

Quoted 5 lines

Caused by commit

cabcebc31de4 ("cifsd: introduce SMB3 kernel server")

I applied the following patch for today:

I send a pull request included this patch to Steve.

Thanks for your patch.

Quoted 71 lines

From: Stephen Rothwell <[email protected]>
Date: Wed, 17 Mar 2021 18:35:55 +1100
Subject: [PATCH] cifsd: uniquify extract_sharename()

---
 fs/cifsd/misc.c    | 4 ++--
 fs/cifsd/misc.h    | 2 +-
 fs/cifsd/smb2pdu.c | 2 +-
 fs/cifsd/unicode.h | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
fs/cifsd/misc.c +2 -2
@@ -210,12 +210,12 @@ void ksmbd_conv_path_to_windows(char *path)  }
 
 /**
- * extract_sharename() - get share name from tree connect request
+ * cifsd_extract_sharename() - get share name from tree connect request
  * @treename:	buffer containing tree name and share name
  *
  * Return:      share name on success, otherwise error
  */
-char *extract_sharename(char *treename)
+char *cifsd_extract_sharename(char *treename)
 {
 	char *name = treename;
 	char *dst;
fs/cifsd/misc.h +1 -1
@@ -25,7 +25,7 @@ void ksmbd_conv_path_to_unix(char *path);  void ksmbd_strip_last_slash(char *path);
 void ksmbd_conv_path_to_windows(char *path);
 
-char *extract_sharename(char *treename);
+char *cifsd_extract_sharename(char *treename);
 
 char *convert_to_unix_name(struct ksmbd_share_config *share, char *name);
 
fs/cifsd/smb2pdu.c +1 -1
@@ -1709,7 +1709,7 @@ int smb2_tree_connect(struct ksmbd_work *work)
 		goto out_err1;
 	}
 
-	name = extract_sharename(treename);
+	name = cifsd_extract_sharename(treename);
 	if (IS_ERR(name)) {
 		status.ret = KSMBD_TREE_CONN_STATUS_ERROR;
 		goto out_err1;
fs/cifsd/unicode.h +1 -1
@@ -69,7 +69,7 @@ char *smb_strndup_from_utf16(const char *src, const int maxlen,
 		const struct nls_table *codepage);
 extern int smbConvertToUTF16(__le16 *target, const char *source, int srclen,
 		const struct nls_table *cp, int mapchars); -extern char *extract_sharename(char
 *treename);
+extern char *cifsd_extract_sharename(char *treename);
 #endif
 
 wchar_t cifs_toupper(wchar_t in);
--

2.30.0

--
Cheers,
Stephen Rothwell