]> Gentwo Git Trees - linux/.git/commit
convert pstore
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 9 May 2024 07:01:37 +0000 (03:01 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 16 Nov 2025 06:35:03 +0000 (01:35 -0500)
commiteec876df5e7647bca03b72e0bcecb2e8bf0390a5
tree4429aa73b5d408535e5f9d960b517aa1c8bb40bb
parent5a8993a15a79f03cd1a43ddc071d0e49a1247cd5
convert pstore

object creation by d_alloc_name()+d_add() in pstore_mkfile(), removal -
via normal VFS codepaths (with ->unlink() using simple_unlink()) or
in pstore_put_backend_records() via locked_recursive_removal()

Replace d_add() with d_make_persistent()+dput() - that's what really
happens there.  The reference that goes into record->dentry is valid
only until the unlink (and explicitly cleared by pstore_unlink()).

Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/pstore/inode.c