Re: [PATCH] smb: fix smbdirect link failure

Namjae Jeon <[email protected]> Sat, 7 Mar 2026 11:56:02 +0900
Newsgroups gmane.linux.kernel,gmane.linux.kernel.cifs,gmane.network.samba.internals
Message-ID <CAKYAXd9qOhxSU9cWh007k0FFO10Z1QknqBw+s+4KWWkUqpJM1w@mail.gmail.com>
On Fri, Mar 6, 2026 at 11:44 PM Arnd Bergmann <[email protected]> wrote:
>
> From: Arnd Bergmann <[email protected]>
>
> When CONFIG_INFINIBAND is set to =m, it is not possible to have SMBDIRECT
> built-in, and it turns into a loadable module, but this does not prevent
> CIFS and SMB_SERVER from being built-in, which in turn causes this
> link error:
>
> ld.lld-22: error: undefined symbol: smbdirect_socket_release
> >>> referenced by smbdirect.c:212 (fs/smb/client/smbdirect.c:212)
> >>>               fs/smb/client/smbdirect.o:(smbd_destroy) in archive vmlinux.a
> >>> referenced by smbdirect.c:212 (fs/smb/client/smbdirect.c:212)
> >>>               fs/smb/client/smbdirect.o:(smbd_reconnect) in archive vmlinux.a
> >>> referenced by smbdirect.c:338 (fs/smb/client/smbdirect.c:338)
> >>>               fs/smb/client/smbdirect.o:(smbd_get_connection) in archive vmlinux.a
>
> Enforce the dependency at Kconfig level, so that the respective smpdirect
> options are only offered if it's possible to link against the common
> module and infiniband.
>
> Fixes: 28504d6ee127 ("smb: client: make use of smbdirect.ko")
> Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Namjae Jeon <[email protected]>
Thanks!