mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
Btrfs: avoid null deref in unpin_extent_cache()
I re-orderred the checks to avoid dereferencing "em" if it was null. Found by smatch static checker. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
df66916e71
commit
4eb3991c5d
1 changed files with 1 additions and 1 deletions
|
@ -208,7 +208,7 @@ int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len)
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue