From: Tsutomu Itoh Date: Mon, 1 Oct 2012 09:08:37 +0000 (-0600) Subject: Btrfs: confirmation of value is added before trace_btrfs_get_extent() is called X-Git-Tag: next-20121002~89^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dcf844b9a786197dc4b5a84b52247561328b64b3;p=karo-tx-linux.git 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 --- 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);