__fixup_perms_recursive(dentry, limit, 0);
}
-void drop_recursive(struct dentry *parent) {
- struct dentry *dentry;
- struct sdcardfs_inode_info *info;
- if (!parent->d_inode)
- return;
- info = SDCARDFS_I(parent->d_inode);
- spin_lock(&parent->d_lock);
- list_for_each_entry(dentry, &parent->d_subdirs, d_u.d_child) {
- if (dentry->d_inode) {
- if (SDCARDFS_I(parent->d_inode)->top != SDCARDFS_I(dentry->d_inode)->top) {
- drop_recursive(dentry);
- d_drop(dentry);
- }
- }
- }
- spin_unlock(&parent->d_lock);
-}
-
-void fixup_top_recursive(struct dentry *parent) {
- struct dentry *dentry;
- struct sdcardfs_inode_info *info;
-
- if (!parent->d_inode)
- return;
- info = SDCARDFS_I(parent->d_inode);
- spin_lock(&parent->d_lock);
- list_for_each_entry(dentry, &parent->d_subdirs, d_u.d_child) {
- if (dentry->d_inode) {
- if (SDCARDFS_I(parent->d_inode)->top != SDCARDFS_I(dentry->d_inode)->top) {
- get_derived_permission(parent, dentry);
- fixup_tmp_permissions(dentry->d_inode);
- fixup_top_recursive(dentry);
- }
- }
- }
- spin_unlock(&parent->d_lock);
-}
-
/* main function for updating derived permission */
inline void update_derived_permission_lock(struct dentry *dentry)
{
get_derived_permission_new(new_dentry->d_parent, old_dentry, &new_dentry->d_name);
fixup_tmp_permissions(old_dentry->d_inode);
fixup_lower_ownership(old_dentry, new_dentry->d_name.name);
- drop_recursive(old_dentry); /* Can't fixup ownership recursively :( */
+ d_invalidate(old_dentry); /* Can't fixup ownership recursively :( */
out:
unlock_rename(lower_old_dir_dentry, lower_new_dir_dentry);
dput(lower_old_dir_dentry);
uid_t uid, bool under_android, struct inode *top);
extern void get_derived_permission(struct dentry *parent, struct dentry *dentry);
extern void get_derived_permission_new(struct dentry *parent, struct dentry *dentry, const struct qstr *name);
-extern void drop_recursive(struct dentry *parent);
-extern void fixup_top_recursive(struct dentry *parent);
extern void fixup_perms_recursive(struct dentry *dentry, struct limit_search *limit);
extern void update_derived_permission_lock(struct dentry *dentry);