I re-orderred the checks to avoid dereferencing "em" if it was null.
Found by smatch static checker.
regards,
dan carpenter
Signed-off-by: Dan Carpenter <error27@gmail.com>
--- orig/fs/btrfs/extent_map.c 2009-11-08 14:01:09.000000000 +0200
+++ devel/fs/btrfs/extent_map.c 2009-11-08 14:01:44.000000000 +0200
@@ -208,7 +208,7 @@
write_lock(&tree->lock);
em = lookup_extent_mapping(tree, start, len);
- WARN_ON(em->start != start || !em);
+ WARN_ON(!em || em->start != start);
if (!em)
goto out;
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html