summaryrefslogtreecommitdiffstats
path: root/fs/pstore
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-03-10 00:34:08 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2025-07-02 22:36:51 -0400
commit7b7a8ca43fcf027f8aabd7c0629c2d39bfd97300 (patch)
treecae8924539bbd86908d44460034097c8f3ba4add /fs/pstore
parentbinfmt_misc: switch to locked_recursive_removal() (diff)
downloadlinux-7b7a8ca43fcf027f8aabd7c0629c2d39bfd97300.tar.gz
linux-7b7a8ca43fcf027f8aabd7c0629c2d39bfd97300.zip
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>
Diffstat (limited to 'fs/pstore')
-rw-r--r--fs/pstore/inode.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index bb3b769edc71..1a2e1185426c 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -300,7 +300,7 @@ static struct dentry *psinfo_lock_root(void)
return NULL;
root = pstore_sb->s_root;
- inode_lock(d_inode(root));
+ inode_lock_nested(d_inode(root), I_MUTEX_PARENT);
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) {
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;
}
}