[PATCH 5/8] pstore: switch to locked_recursive_removal()

Al Viro
2025-06-14T06:02:32Z

rather than playing with manual d_invalidate()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
fs/pstore/inode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index bb3b769edc71..93307e677f91 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -318,8 +318,7 @@ int pstore_put_backend_records(struct pstore_info *psi)
list_for_each_entry_safe(pos, tmp, &records_list, list) {
if (pos->record->psi == psi) {
list_del_init(&pos->list);
- d_invalidate(pos->dentry);
- simple_unlink(d_inode(root), pos->dentry);
+ locked_recursive_removal(pos->dentry, NULL);
pos->dentry = NULL;
}
}
--
2.39.5