From: Al Viro Date: Sun, 26 Oct 2014 23:19:16 +0000 (-0400) Subject: selinux_l: move d_rcu from overlapping d_child to overlapping d_alias X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=67395ff79d23088bf09dd3fbec1b2ef31f6831be;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git selinux_l: move d_rcu from overlapping d_child to overlapping d_alias commit 946e51f2bf37f1656916eb75bd0742ba33983c28 upstream. Signed-off-by: Al Viro Cc: Ben Hutchings [hujianyang: Backported to 3.10 refer to the work of Ben Hutchings in 3.2: - Apply name changes in all the different places we use d_alias and d_child - Move the WARN_ON() in __d_free() to d_free() as we don't have dentry_free()] Signed-off-by: hujianyang Signed-off-by: Greg Kroah-Hartman --- diff --git a/security/selinux_l/selinuxfs.c b/security/selinux_l/selinuxfs.c index b65b5a238a0..d49d1034f99 100644 --- a/security/selinux_l/selinuxfs.c +++ b/security/selinux_l/selinuxfs.c @@ -1204,7 +1204,7 @@ static void sel_remove_entries(struct dentry *de) spin_lock(&de->d_lock); node = de->d_subdirs.next; while (node != &de->d_subdirs) { - struct dentry *d = list_entry(node, struct dentry, d_u.d_child); + struct dentry *d = list_entry(node, struct dentry, d_child); spin_lock_nested(&d->d_lock, DENTRY_D_LOCK_NESTED); list_del_init(node); @@ -1678,12 +1678,12 @@ static void sel_remove_classes(void) list_for_each(class_node, &class_dir->d_subdirs) { struct dentry *class_subdir = list_entry(class_node, - struct dentry, d_u.d_child); + struct dentry, d_child); struct list_head *class_subdir_node; list_for_each(class_subdir_node, &class_subdir->d_subdirs) { struct dentry *d = list_entry(class_subdir_node, - struct dentry, d_u.d_child); + struct dentry, d_child); if (d->d_inode) if (d->d_inode->i_mode & S_IFDIR)