* [PATCH] ksmbd: use ib_device_get_netdev() instead of calling ops.get_netdev
@ 2025-03-22 0:30 Namjae Jeon
2025-03-25 12:22 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Namjae Jeon @ 2025-03-22 0:30 UTC (permalink / raw)
To: linux-cifs
Cc: smfrench, senozhatsky, tom, atteh.mailbox, Namjae Jeon,
Leon Romanovsky
ULPs are not supposed to call to ops.* directly.
Suggested-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
---
fs/smb/server/transport_rdma.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c
index 9837a41641ce..4998df04ab95 100644
--- a/fs/smb/server/transport_rdma.c
+++ b/fs/smb/server/transport_rdma.c
@@ -2142,8 +2142,7 @@ static int smb_direct_ib_client_add(struct ib_device *ib_dev)
if (ib_dev->node_type != RDMA_NODE_IB_CA)
smb_direct_port = SMB_DIRECT_PORT_IWARP;
- if (!ib_dev->ops.get_netdev ||
- !rdma_frwr_is_supported(&ib_dev->attrs))
+ if (!rdma_frwr_is_supported(&ib_dev->attrs))
return 0;
smb_dev = kzalloc(sizeof(*smb_dev), KSMBD_DEFAULT_GFP);
@@ -2243,8 +2242,7 @@ bool ksmbd_rdma_capable_netdev(struct net_device *netdev)
for (i = 0; i < smb_dev->ib_dev->phys_port_cnt; i++) {
struct net_device *ndev;
- ndev = smb_dev->ib_dev->ops.get_netdev(smb_dev->ib_dev,
- i + 1);
+ ndev = ib_device_get_netdev(smb_dev->ib_dev, i + 1);
if (!ndev)
continue;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ksmbd: use ib_device_get_netdev() instead of calling ops.get_netdev
2025-03-22 0:30 [PATCH] ksmbd: use ib_device_get_netdev() instead of calling ops.get_netdev Namjae Jeon
@ 2025-03-25 12:22 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2025-03-25 12:22 UTC (permalink / raw)
To: Namjae Jeon; +Cc: linux-cifs, smfrench, senozhatsky, tom, atteh.mailbox
On Sat, Mar 22, 2025 at 09:30:54AM +0900, Namjae Jeon wrote:
> ULPs are not supposed to call to ops.* directly.
>
> Suggested-by: Leon Romanovsky <leon@kernel.org>
> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
> ---
> fs/smb/server/transport_rdma.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Thanks,
Reviewed-by: Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-25 12:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-22 0:30 [PATCH] ksmbd: use ib_device_get_netdev() instead of calling ops.get_netdev Namjae Jeon
2025-03-25 12:22 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox