Skip to content

Commit 7b7a8ca

Browse files
author
Al Viro
committed
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>
1 parent eacb58f commit 7b7a8ca

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

fs/pstore/inode.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static struct dentry *psinfo_lock_root(void)
300300
return NULL;
301301

302302
root = pstore_sb->s_root;
303-
inode_lock(d_inode(root));
303+
inode_lock_nested(d_inode(root), I_MUTEX_PARENT);
304304

305305
return root;
306306
}
@@ -318,8 +318,7 @@ int pstore_put_backend_records(struct pstore_info *psi)
318318
list_for_each_entry_safe(pos, tmp, &records_list, list) {
319319
if (pos->record->psi == psi) {
320320
list_del_init(&pos->list);
321-
d_invalidate(pos->dentry);
322-
simple_unlink(d_inode(root), pos->dentry);
321+
locked_recursive_removal(pos->dentry, NULL);
323322
pos->dentry = NULL;
324323
}
325324
}

0 commit comments

Comments
 (0)