diff options
| author | Mina Almasry <[email protected]> | 2025-05-23 23:05:17 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-05-28 02:19:35 +0000 |
| commit | 88e47c93b3a2a45b55f03f238b68be826917bb2e (patch) | |
| tree | 48f5cc099a59c406f3ac66ac5634bbaccefbee03 /net/core/devmem.c | |
| parent | selftests: netfilter: nft_queue.sh: include file transfer duration in log mes... (diff) | |
| download | kernel-88e47c93b3a2a45b55f03f238b68be826917bb2e.tar.gz kernel-88e47c93b3a2a45b55f03f238b68be826917bb2e.zip | |
net: devmem: move list_add to net_devmem_bind_dmabuf.
It's annoying for the list_add to be outside net_devmem_bind_dmabuf, but
the list_del is in net_devmem_unbind_dmabuf. Make it consistent by
having both the list_add/del be inside the net_devmem_[un]bind_dmabuf.
Cc: [email protected]
Signed-off-by: Mina Almasry <[email protected]>
Tested-by: Taehee Yoo <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/core/devmem.c')
| -rw-r--r-- | net/core/devmem.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/devmem.c b/net/core/devmem.c index 0dba26baae18..b3a62ca0df65 100644 --- a/net/core/devmem.c +++ b/net/core/devmem.c @@ -178,7 +178,8 @@ err_close_rxq: struct net_devmem_dmabuf_binding * net_devmem_bind_dmabuf(struct net_device *dev, enum dma_data_direction direction, - unsigned int dmabuf_fd, struct netlink_ext_ack *extack) + unsigned int dmabuf_fd, struct netdev_nl_sock *priv, + struct netlink_ext_ack *extack) { struct net_devmem_dmabuf_binding *binding; static u32 id_alloc_next; @@ -299,6 +300,8 @@ net_devmem_bind_dmabuf(struct net_device *dev, if (err < 0) goto err_free_chunks; + list_add(&binding->list, &priv->bindings); + return binding; err_free_chunks: |
