mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
pstore: switch to locked_recursive_removal()
rather than playing with manual d_invalidate() Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -300,7 +300,7 @@ static struct dentry *psinfo_lock_root(void)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
root = pstore_sb->s_root;
|
root = pstore_sb->s_root;
|
||||||
inode_lock(d_inode(root));
|
inode_lock_nested(d_inode(root), I_MUTEX_PARENT);
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
@@ -318,8 +318,7 @@ int pstore_put_backend_records(struct pstore_info *psi)
|
|||||||
list_for_each_entry_safe(pos, tmp, &records_list, list) {
|
list_for_each_entry_safe(pos, tmp, &records_list, list) {
|
||||||
if (pos->record->psi == psi) {
|
if (pos->record->psi == psi) {
|
||||||
list_del_init(&pos->list);
|
list_del_init(&pos->list);
|
||||||
d_invalidate(pos->dentry);
|
locked_recursive_removal(pos->dentry, NULL);
|
||||||
simple_unlink(d_inode(root), pos->dentry);
|
|
||||||
pos->dentry = NULL;
|
pos->dentry = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user