mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
erofs: fix up erofs_lookup tracepoint
commit93368aab0e
upstream. Fix up a misuse that the filename pointer isn't always valid in the ring buffer, and we should copy the content instead. Link: https://lore.kernel.org/r/20210921143531.81356-1-hsiangkao@linux.alibaba.com Fixes:13f06f48f7
("staging: erofs: support tracepoint") Cc: stable@vger.kernel.org # 4.19+ Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
91e4ad05bf
commit
8326be9e51
1 changed files with 3 additions and 3 deletions
|
@ -35,20 +35,20 @@ TRACE_EVENT(erofs_lookup,
|
|||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev )
|
||||
__field(erofs_nid_t, nid )
|
||||
__field(const char *, name )
|
||||
__string(name, dentry->d_name.name )
|
||||
__field(unsigned int, flags )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->dev = dir->i_sb->s_dev;
|
||||
__entry->nid = EROFS_I(dir)->nid;
|
||||
__entry->name = dentry->d_name.name;
|
||||
__assign_str(name, dentry->d_name.name);
|
||||
__entry->flags = flags;
|
||||
),
|
||||
|
||||
TP_printk("dev = (%d,%d), pnid = %llu, name:%s, flags:%x",
|
||||
show_dev_nid(__entry),
|
||||
__entry->name,
|
||||
__get_str(name),
|
||||
__entry->flags)
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue