diff options
author | Simon Arlott <simon@fire.lp0.eu> | 2010-05-10 09:31:11 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-15 23:10:15 -0700 |
commit | e0f43752a942b7be1bc06b9fd74e20ae337c1cca (patch) | |
tree | 892d0fbc2ecae39f2e5c4a7b711cbb988c8dc3f1 /fs/sysfs | |
parent | 28a16c97963d3bc36a2c192859f6d8025ef2967a (diff) |
bridge: update sysfs link names if port device names have changed
Links for each port are created in sysfs using the device
name, but this could be changed after being added to the
bridge.
As well as being unable to remove interfaces after this
occurs (because userspace tools don't recognise the new
name, and the kernel won't recognise the old name), adding
another interface with the old name to the bridge will
cause an error trying to create the sysfs link.
This fixes the problem by listening for NETDEV_CHANGENAME
notifications and renaming the link.
https://bugzilla.kernel.org/show_bug.cgi?id=12743
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/symlink.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index b93ec51fa7ac..942f239a2132 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c @@ -261,3 +261,4 @@ const struct inode_operations sysfs_symlink_inode_operations = { EXPORT_SYMBOL_GPL(sysfs_create_link); EXPORT_SYMBOL_GPL(sysfs_remove_link); +EXPORT_SYMBOL_GPL(sysfs_rename_link); |