Skip to content

Commit

Permalink
sdcardfs: Fix issue with d_child move
Browse files Browse the repository at this point in the history
"move d_rcu from overlapping d_child to overlapping d_alias"
moved the location of d_child in struct dentry. This fixes
a container_of that relied on that in sdcardfs

Change-Id: I56991d7d168a887ec01ef3877b576f249f35816f
  • Loading branch information
drosen-google authored and NotNoelChannel committed Nov 13, 2023
1 parent c0fd740 commit bb507b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/sdcardfs/derived_perm.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ static void __fixup_perms_recursive(struct dentry *dentry, struct limit_search *
info = SDCARDFS_I(dentry->d_inode);

if (needs_fixup(info->data->perm)) {
list_for_each_entry(child, &dentry->d_subdirs, d_u.d_child) {
list_for_each_entry(child, &dentry->d_subdirs, d_child) {
spin_lock_nested(&child->d_lock, depth + 1);
if (!(limit->flags & BY_NAME) || qstr_case_eq(&child->d_name, &limit->name)) {
if (child->d_inode) {
Expand All @@ -308,7 +308,7 @@ static void __fixup_perms_recursive(struct dentry *dentry, struct limit_search *
spin_unlock(&child->d_lock);
}
} else if (descendant_may_need_fixup(info->data, limit)) {
list_for_each_entry(child, &dentry->d_subdirs, d_u.d_child) {
list_for_each_entry(child, &dentry->d_subdirs, d_child) {
__fixup_perms_recursive(child, limit, depth + 1);
}
}
Expand Down

0 comments on commit bb507b1

Please sign in to comment.