Re: [PATCH 19/26] Btrfs: add code to scrub to copy read data to another disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 07 Nov 2012 09:30:59 +0900, Tsutomu Itoh wrote:
> (2012/11/07 1:38), Stefan Behrens wrote:
>> +static int scrub_add_page_to_wr_bio(struct scrub_ctx *sctx,
>> +				    struct scrub_page *spage)
>> +{
>> +	struct scrub_wr_ctx *wr_ctx = &sctx->wr_ctx;
>> +	struct scrub_bio *sbio;
>> +	int ret;
>> +
>> +	mutex_lock(&wr_ctx->wr_lock);
>> +again:
>> +	if (!wr_ctx->wr_curr_bio) {
>> +		wr_ctx->wr_curr_bio = kzalloc(sizeof(*wr_ctx->wr_curr_bio),
>> +					      GFP_NOFS);
>> +		if (!wr_ctx->wr_curr_bio)
> 
> I think mutex_unlock(&wr_ctx->wr_lock) is necessary before it returns.
> 
>> +			return -ENOMEM;

Thanks Tsutomu!
I'll fix it in
git://btrfs.giantdisaster.de/git/btrfs device-replace

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux