Re: [PATCH v2] Btrfs: remove unneeded allocation in load_free_space_cache()

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

 



On Wed, Jan 19, 2011 at 06:58:37PM +0200, Ilya Dryomov wrote:
> I messed up size argument of kzalloc() and consequently memcpy().  Here
> is an updated version.
> 
> 
> The checksums array is unused, remove it.  We only need disk_crcs array
> to verify checksums.
> 
> There is no need to allocate first_page_offset bytes for disk_crcs
> array.  It's enough to allocate (sizeof(u32) * num_checksums) bytes
> because disk_crcs should only hold checksums.  gen is fetched
> directly from the page.
> 
> cur_crc is initialized later in the code.  Don't initialize it in a
> declaration.
> 
> Signed-off-by: Ilya Dryomov <idryomov@xxxxxxxxx>

Reviewed-by: Josef Bacik <josef@xxxxxxxxxx>

Thanks,

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