From f0bd95ea72644cbf9210606f6f8edfce13d65d47 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 d24b65014612..f92def2467a6 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5505,7 +5505,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);