summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_buf_mem.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-03-07 15:13:52 -0800
committerChandan Babu R <chandanbabu@kernel.org>2024-03-15 10:30:23 +0530
commit215b2bf72a05d702287fc45d854b4f5019f9aad1 (patch)
tree2b40f4bc63ee72ed342fdf28366bd65b32c20fbf /fs/xfs/xfs_buf_mem.c
parent75bcffbb9e7563259b7aed0fa77459d6a3a35627 (diff)
xfs: fix dev_t usage in xmbuf tracepoints
Fix some inconsistencies in the xmbuf tracepoints -- they should be reporting the major/minor of the filesystem that they're associated with, so that we have some clue on whose behalf the xmbuf was created. Fix the xmbuf_free tracepoint to report the same. Don't call the trace function until the xmbuf is fully initialized. Fixes: 5076a6040ca1 ("xfs: support in-memory buffer cache target") Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_buf_mem.c')
-rw-r--r--fs/xfs/xfs_buf_mem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_buf_mem.c b/fs/xfs/xfs_buf_mem.c
index 8ad38c64708e..9bb2d24de709 100644
--- a/fs/xfs/xfs_buf_mem.c
+++ b/fs/xfs/xfs_buf_mem.c
@@ -81,8 +81,6 @@ xmbuf_alloc(
/* ensure all writes are below EOF to avoid pagecache zeroing */
i_size_write(inode, inode->i_sb->s_maxbytes);
- trace_xmbuf_create(btp);
-
error = xfs_buf_cache_init(btp->bt_cache);
if (error)
goto out_file;
@@ -99,6 +97,8 @@ xmbuf_alloc(
if (error)
goto out_bcache;
+ trace_xmbuf_create(btp);
+
*btpp = btp;
return 0;