Skip to content

Commit

Permalink
ksmbd: use netif_is_bridge_port
Browse files Browse the repository at this point in the history
Use netif_is_bridge_port defined in <linux/netdevice.h> instead of
open-coding it.

Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
tklauser authored and Steve French committed Mar 20, 2022
1 parent 9c16668 commit 1b699bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ksmbd/transport_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ static int ksmbd_netdev_event(struct notifier_block *nb, unsigned long event,

switch (event) {
case NETDEV_UP:
if (netdev->priv_flags & IFF_BRIDGE_PORT)
if (netif_is_bridge_port(netdev))
return NOTIFY_OK;

list_for_each_entry(iface, &iface_list, entry) {
Expand Down Expand Up @@ -585,7 +585,7 @@ int ksmbd_tcp_set_interfaces(char *ifc_list, int ifc_list_sz)

rtnl_lock();
for_each_netdev(&init_net, netdev) {
if (netdev->priv_flags & IFF_BRIDGE_PORT)
if (netif_is_bridge_port(netdev))
continue;
if (!alloc_iface(kstrdup(netdev->name, GFP_KERNEL)))
return -ENOMEM;
Expand Down

0 comments on commit 1b699bf

Please sign in to comment.