avoid null deref in unpin_extent_cache()
diff mbox

Message ID alpine.DEB.2.00.0911072313580.30287@bicker
State Accepted
Headers show

Commit Message

Dan Carpenter Nov. 10, 2009, 9:01 a.m. UTC
None

Patch
diff mbox

--- 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;