]> git.baikalelectronics.ru Git - kernel.git/commit
writeback: don't access page->mapping directly in track_foreign_dirty TP
authorTejun Heo <tj@kernel.org>
Fri, 30 Aug 2019 23:39:54 +0000 (16:39 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 31 Aug 2019 01:54:28 +0000 (19:54 -0600)
commit8814c9a29270a800fdbc6836bee7b911522c3a5d
treec20571682d26e50058ed4d6ac54b4a9149f08dab
parentd2fb053287d43cc3f899aa3bfab74f6519dfdd59
writeback: don't access page->mapping directly in track_foreign_dirty TP

page->mapping may encode different values in it and page_mapping()
should always be used to access the mapping pointer.
track_foreign_dirty tracepoint was incorrectly accessing page->mapping
directly.  Use page_mapping() instead.  Also, add NULL checks while at
it.

Fixes: 50be13385597 ("writeback: add tracepoints for cgroup foreign writebacks")
Reported-by: Jan Kara <jack@suse.cz>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/trace/events/writeback.h