* [PATCH] netfs: Fix the netfs_folio tracepoint to handle NULL mapping
@ 2024-09-30 11:59 David Howells
2024-09-30 12:11 ` Christian Brauner
0 siblings, 1 reply; 3+ messages in thread
From: David Howells @ 2024-09-30 11:59 UTC (permalink / raw)
To: Christian Brauner
Cc: dhowells, Jeff Layton, netfs, linux-fsdevel, linux-kernel
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>
cc: Jeff Layton <jlayton@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
---
include/trace/events/netfs.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/trace/events/netfs.h b/include/trace/events/netfs.h
index 76bd42a96815..1d7c52821e55 100644
--- a/include/trace/events/netfs.h
+++ b/include/trace/events/netfs.h
@@ -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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] netfs: Fix the netfs_folio tracepoint to handle NULL mapping
2024-09-30 11:59 [PATCH] netfs: Fix the netfs_folio tracepoint to handle NULL mapping David Howells
@ 2024-09-30 12:11 ` Christian Brauner
0 siblings, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2024-09-30 12:11 UTC (permalink / raw)
To: David Howells
Cc: Christian Brauner, Jeff Layton, netfs, linux-fsdevel,
linux-kernel
On Mon, 30 Sep 2024 12:59:16 +0100, David Howells wrote:
> Fix the netfs_folio tracepoint to handle folios that have a NULL mapping
> pointer. In such a case, just substitute a zero inode number.
>
>
Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes
[1/1] netfs: Fix the netfs_folio tracepoint to handle NULL mapping
https://git.kernel.org/vfs/vfs/c/f801850bc263
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] netfs: Fix the netfs_folio tracepoint to handle NULL mapping
@ 2024-10-02 9:23 exkc
0 siblings, 0 replies; 3+ messages in thread
From: exkc @ 2024-10-02 9:23 UTC (permalink / raw)
To: exxxxkc; +Cc: David Howells, Jeff Layton, netfs, linux-fsdevel,
Christian Brauner
From: David Howells <dhowells@redhat.com>
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>
---
include/trace/events/netfs.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/trace/events/netfs.h b/include/trace/events/netfs.h
index 76bd42a96815..1d7c52821e55 100644
--- a/include/trace/events/netfs.h
+++ b/include/trace/events/netfs.h
@@ -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);
--
2.46.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-02 9:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 11:59 [PATCH] netfs: Fix the netfs_folio tracepoint to handle NULL mapping David Howells
2024-09-30 12:11 ` Christian Brauner
-- strict thread matches above, loose matches on Subject: below --
2024-10-02 9:23 exkc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).