This was found by smatch (http://repo.or.cz/w/smatch.git/)

regards,
dan carpenter

Signed-off-by: Dan Carpenter <[email protected]>

--- orig/fs/btrfs/transaction.c 2009-03-26 16:25:37.000000000 +0300
+++ devel/fs/btrfs/transaction.c        2009-03-26 16:26:36.000000000 +0300
@@ -914,8 +914,10 @@
        }
 
        pinned_copy = kmalloc(sizeof(*pinned_copy), GFP_NOFS);
-       if (!pinned_copy)
+       if (!pinned_copy) {
+               mutex_unlock(&root->fs_info->trans_mutex);
                return -ENOMEM;
+       }
 
        extent_io_tree_init(pinned_copy,
                             root->fs_info->btree_inode->i_mapping, GFP_NOFS);
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to