afs: Fix use-after-loss-of-ref
afs_lookup() has a tracepoint to indicate the outcome of
d_splice_alias(), passing it the inode to retrieve the fid from.
However, the function gave up its ref on that inode when it called
d_splice_alias(), which may have failed and dropped the inode.
Fix this by caching the fid.
Fixes: 80548b03991f ("afs: Add more tracepoints")
Reported-by: Al Viro <firstname.lastname@example.org>
Signed-off-by: David Howells <email@example.com>
Signed-off-by: Linus Torvalds <firstname.lastname@example.org>
2 files changed