Re: [patch] btrfs: remove dead code #3

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

 



On Thu, Mar 26 2009, Dan Carpenter wrote:
> kzalloc() already initialized ->error to zero.
> 
> regards,
> dan carpenter
> 
> Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>
> 
> --- orig/fs/btrfs/volumes.c	2009-03-26 17:14:13.000000000 +0300
> +++ devel/fs/btrfs/volumes.c	2009-03-26 17:14:55.000000000 +0300
> @@ -2422,10 +2422,8 @@
>  		multi = kzalloc(btrfs_multi_bio_size(stripes_allocated),
>  				GFP_NOFS);
>  		if (!multi)
>  			return -ENOMEM;
> -
> -		atomic_set(&multi->error, 0);
>  	}
>  
>  	spin_lock(&em_tree->lock);
>  	em = lookup_extent_mapping(em_tree, logical, *length);

Careful, some archs require a barrier there. It's dangerous to makes
assumptions about the underlying implementation of such things, I'd
leave that one alone.

-- 
Jens Axboe

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