netfs: Fix the netfs_folio tracepoint to handle NULL mapping
Subsystems (3)
PATCH 1/1 netfs: Fix the netfs_folio tracepoint to handle NULL mapping
From: David Howells <[email protected]>
Fix the netfs_folio tracepoint to handle folios that have a NULL mapping pointer. In such a case, just substitute a zero inode number.
Fixes c38f4e96e605 ("netfs: Provide func to copy data to pagecache for buffered write")
Signed-off-by David Howells <[email protected]>
cc Jeff Layton <[email protected]>
Signed-off-by Christian Brauner <[email protected]>
--- include/trace/events/netfs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/trace/events/netfs.h +2 -1
@@ -448,7 +448,8 @@ TRACE_EVENT(netfs_folio, ),TP_fast_assign ( - __entry->ino = folio->mapping->host->i_ino; + struct address_space *__m = READ_ONCE(folio->mapping); + __entry->ino = __m ? __m->host->i_ino :0 ; __entry->why = why; __entry->index =folio_index (folio); __entry->nr =folio_nr_pages (folio);
Signature · 1 line
2.46.1