diff mbox

[1/1] btrfs: add missing spin_unlock to a rare exit path

Message ID 1303302855-23093-1-git-send-email-dsterba@suse.cz (mailing list archive)
State New, archived
Headers show

Commit Message

David Sterba April 20, 2011, 12:34 p.m. UTC
Signed-off-by: David Sterba <dsterba@suse.cz>
---
 fs/btrfs/disk-io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

liubo April 21, 2011, 1:02 a.m. UTC | #1
Good catch!

thanks,
liubo

On 04/20/2011 08:34 PM, David Sterba wrote:
> Signed-off-by: David Sterba <dsterba@suse.cz>
> ---
>  fs/btrfs/disk-io.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 5e5d07c..25e4b8f 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -2825,6 +2825,7 @@ static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
>  
>  	spin_lock(&delayed_refs->lock);
>  	if (delayed_refs->num_entries == 0) {
> +		spin_unlock(&delayed_refs->lock);
>  		printk(KERN_INFO "delayed_refs has NO entry\n");
>  		return ret;
>  	}

--
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
diff mbox

Patch

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 5e5d07c..25e4b8f 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2825,6 +2825,7 @@  static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
 
 	spin_lock(&delayed_refs->lock);
 	if (delayed_refs->num_entries == 0) {
+		spin_unlock(&delayed_refs->lock);
 		printk(KERN_INFO "delayed_refs has NO entry\n");
 		return ret;
 	}