diff mbox

avoid null deref in unpin_extent_cache()

Message ID alpine.DEB.2.00.0911072313580.30287@bicker (mailing list archive)
State Accepted
Headers show

Commit Message

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

Patch

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