sysfs: Propagate renames to the vfs on demand
By teaching sysfs_revalidate to hide a dentry for a sysfs_dirent if the sysfs_dirent has been renamed, and by teaching sysfs_lookup to return the original dentry if the sysfs dirent has been renamed. I can show the results of renames correctly without having to update the dcache during the directory rename. This massively simplifies the rename logic allowing a lot of weird sysfs special cases to be removed along with a lot of now unnecesary helper code. Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a16bbc3430
commit
832b6af198
@@ -103,7 +103,6 @@ extern struct kmem_cache *sysfs_dir_cachep;
|
||||
* dir.c
|
||||
*/
|
||||
extern struct mutex sysfs_mutex;
|
||||
extern struct mutex sysfs_rename_mutex;
|
||||
extern spinlock_t sysfs_assoc_lock;
|
||||
|
||||
extern const struct file_operations sysfs_dir_operations;
|
||||
|
Reference in New Issue
Block a user