From dcf844b9a786197dc4b5a84b52247561328b64b3 Mon Sep 17 00:00:00 2001 From: Tsutomu Itoh Date: Mon, 1 Oct 2012 03:08:37 -0600 Subject: [PATCH] Btrfs: confirmation of value is added before trace_btrfs_get_extent() is called We should confirm the value of extent_map before calling trace_btrfs_get_extent() because the value of extent_map has the possibility of NULL. Signed-off-by: Tsutomu Itoh --- fs/btrfs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 50a54b3ef7e6..2c785c09081e 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6121,7 +6121,8 @@ insert: write_unlock(&em_tree->lock); out: - trace_btrfs_get_extent(root, em); + if (em) + trace_btrfs_get_extent(root, em); if (path) btrfs_free_path(path); -- 2.39.5