diff mbox series

ksmbd: use netif_is_bridge_port

Message ID 20220302151109.19892-1-tklauser@distanz.ch (mailing list archive)
State New, archived
Headers show
Series ksmbd: use netif_is_bridge_port | expand

Commit Message

Tobias Klauser March 2, 2022, 3:11 p.m. UTC
Use netif_is_bridge_port defined in <linux/netdevice.h> instead of
open-coding it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 fs/ksmbd/transport_tcp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Namjae Jeon March 3, 2022, 12:12 a.m. UTC | #1
2022-03-03 0:11 GMT+09:00, Tobias Klauser <tklauser@distanz.ch>:
> Use netif_is_bridge_port defined in <linux/netdevice.h> instead of
> open-coding it.
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>

Thanks!
diff mbox series

Patch

diff --git a/fs/ksmbd/transport_tcp.c b/fs/ksmbd/transport_tcp.c
index 82a1429bbe12..8fef9de787d3 100644
--- a/fs/ksmbd/transport_tcp.c
+++ b/fs/ksmbd/transport_tcp.c
@@ -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) {
@@ -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;