mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 09:34:17 +00:00
netfs: Fix the netfs_folio tracepoint to handle NULL mapping
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 <dhowells@redhat.com> Link: https://lore.kernel.org/r/2917423.1727697556@warthog.procyon.org.uk cc: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
28e8c5c095
commit
f801850bc2
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user