forked from luck/tmp_suning_uos_patched
sysfs: Update the name hash when renaming sysfs entries
This fixes a bug introduced with sysfs name hashes where renaming a network device appears to succeed but silently makes the sysfs files for that network device inaccessible. In at least one configuration this bug has stopped networking from coming up during boot. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Tested-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
07d251460b
commit
d5c38b137a
|
@ -872,6 +872,7 @@ int sysfs_rename(struct sysfs_dirent *sd,
|
|||
|
||||
dup_name = sd->s_name;
|
||||
sd->s_name = new_name;
|
||||
sd->s_hash = sysfs_name_hash(sd->s_ns, sd->s_name);
|
||||
}
|
||||
|
||||
/* Move to the appropriate place in the appropriate directories rbtree. */
|
||||
|
|
Loading…
Reference in New Issue
Block a user