Skip to content

Commit fe8300f

Browse files
TaeheeYoodavem330
authored andcommitted
net: core: add __netdev_upper_dev_unlink()
The netdev_upper_dev_unlink() has to work differently according to flags. This idea is the same with __netdev_upper_dev_link(). In the following patches, new flags will be added. Signed-off-by: Taehee Yoo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1aad804 commit fe8300f

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

net/core/dev.c

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7762,16 +7762,8 @@ int netdev_master_upper_dev_link(struct net_device *dev,
77627762
}
77637763
EXPORT_SYMBOL(netdev_master_upper_dev_link);
77647764

7765-
/**
7766-
* netdev_upper_dev_unlink - Removes a link to upper device
7767-
* @dev: device
7768-
* @upper_dev: new upper device
7769-
*
7770-
* Removes a link to device which is upper to this one. The caller must hold
7771-
* the RTNL lock.
7772-
*/
7773-
void netdev_upper_dev_unlink(struct net_device *dev,
7774-
struct net_device *upper_dev)
7765+
static void __netdev_upper_dev_unlink(struct net_device *dev,
7766+
struct net_device *upper_dev)
77757767
{
77767768
struct netdev_notifier_changeupper_info changeupper_info = {
77777769
.info = {
@@ -7800,6 +7792,20 @@ void netdev_upper_dev_unlink(struct net_device *dev,
78007792
__netdev_walk_all_upper_dev(upper_dev, __netdev_update_lower_level,
78017793
NULL);
78027794
}
7795+
7796+
/**
7797+
* netdev_upper_dev_unlink - Removes a link to upper device
7798+
* @dev: device
7799+
* @upper_dev: new upper device
7800+
*
7801+
* Removes a link to device which is upper to this one. The caller must hold
7802+
* the RTNL lock.
7803+
*/
7804+
void netdev_upper_dev_unlink(struct net_device *dev,
7805+
struct net_device *upper_dev)
7806+
{
7807+
__netdev_upper_dev_unlink(dev, upper_dev);
7808+
}
78037809
EXPORT_SYMBOL(netdev_upper_dev_unlink);
78047810

78057811
static void __netdev_adjacent_dev_set(struct net_device *upper_dev,

0 commit comments

Comments
 (0)